trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svarnau <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #833: jira 2227 : support json fuction - JS...
Date Mon, 14 Nov 2016 22:35:57 GMT
Github user svarnau commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/833#discussion_r87909148
  
    --- Diff: core/sql/common/stringinfo.h ---
    @@ -0,0 +1,137 @@
    +#ifndef STRINGINFO_H
    +#define STRINGINFO_H
    +
    +#include <sys/types.h>
    +#include <stdarg.h>
    +
    +#ifndef NULL
    +#define NULL	((void *) 0)
    +#endif
    +
    +/*-------------------------
    + * StringInfoData holds information about an extensible string.
    + *		data	is the current buffer for the string (allocated with palloc).
    + *		len		is the current string length.  There is guaranteed to be
    + *				a terminating '\0' at data[len], although this is not very
    + *				useful when the string holds binary data rather than text.
    + *		maxlen	is the allocated size in bytes of 'data', i.e. the maximum
    + *				string size (including the terminating '\0' char) that we can
    + *				currently store in 'data' without having to reallocate
    + *				more space.  We must always have maxlen > len.
    + *		cursor	is initialized to zero by makeStringInfo or initStringInfo,
    + *				but is not otherwise touched by the stringinfo.c routines.
    + *				Some routines use it to scan through a StringInfo.
    + *-------------------------
    + */
    +typedef struct StringInfoData
    +{
    +    char	   *data;
    +    int			len;
    +    int			maxlen;
    +    int			cursor;
    +} StringInfoData;
    +
    +typedef StringInfoData *StringInfo;
    --- End diff --
    
    Absolutely right. Such code would also have to be documented in licenses/lic-server-src
that is used to build the LICENSE file that goes out with the released code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message