pull/6753/head
Gokhan Gulbiz 2023-03-20 08:49:39 +03:00
parent f972b6fae9
commit df3ad5c4f6
No known key found for this signature in database
GPG Key ID: 608EF06B6BD1B45B
1 changed files with 8 additions and 3 deletions

View File

@ -645,9 +645,13 @@ ExtractTopComment(const char *inputString)
if (commentEndCharsIndex > commentStartCharsLength) if (commentEndCharsIndex > commentStartCharsLength)
{ {
Datum substringTextDatum = DirectFunctionCall3(text_substr, PointerGetDatum(inputString), Datum substringTextDatum = DirectFunctionCall3(text_substr, PointerGetDatum(
Int32GetDatum(commentStartCharsLength), inputString),
Int32GetDatum(commentEndCharsIndex - commentStartCharsLength)); Int32GetDatum(
commentStartCharsLength),
Int32GetDatum(
commentEndCharsIndex -
commentStartCharsLength));
return TextDatumGetCString(substringTextDatum); return TextDatumGetCString(substringTextDatum);
} }
else else
@ -656,6 +660,7 @@ ExtractTopComment(const char *inputString)
} }
} }
/* EscapeCommentChars adds a backslash before each occurrence of '*' or '/' in the input string */ /* EscapeCommentChars adds a backslash before each occurrence of '*' or '/' in the input string */
static char * static char *
EscapeCommentChars(const char *str) EscapeCommentChars(const char *str)