Skip to content

Commit

Permalink
Shorten long comment line. Keep to 90 chars or less.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Russell committed Feb 10, 2014
1 parent dd35aa9 commit 54ddfe6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions udf-sample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ StringVal StripVowels(FunctionContext* context, const StringVal& arg1) {
shorter.append(1, (char)c);
}
}
// The modified string is stored in 'shorter', which is destroyed when this function ends. We need to make a string val
// and copy the contents.
StringVal result(context, shorter.size()); // Only the version of the ctor that takes a context object allocates new memory
// The modified string is stored in 'shorter', which is destroyed when this function
// ends. We need to make a string val and copy the contents.
// NB: Only the version of the ctor that takes a context object allocates new memory.
StringVal result(context, shorter.size());
memcpy(result.ptr, shorter.c_str(), shorter.size());
return result;
}

0 comments on commit 54ddfe6

Please sign in to comment.