commit e8ee345fae915e7698cbb10d23d02ae0f6c94b81
parent 636c4f0b3064e523fba796c8b9530a3e1c004a87
Author: Remy Noulin <loader2x@gmail.com>
Date: Sun, 22 Dec 2019 18:31:06 +0100
New major release: the API prototypes are unchanged, data is not freed automatically as before when there is an error. This version might cause memory leaks.
Add crop and cropElem, to slice and delete elements in smallArray,
smallDict and smallJson
Add appendText generic for smallArray and update appendFileG generic to
support all types.
Add support for any baset class as element of smallArray, smallDict and
smallJson
Push now returns an error when the pushed value is NULL. (before push
was inserting an undefined object, an empty string, an empty dictionary
or an empty array)
Moreover all functions with parameters return an error when any
parameter is invalid
pushNFree frees the pushed value container only when is is successful,
an error is returned otherwise. (before pushNFree was freeing the value
under all conditions)
Moreover all NFree functions free the parameter containers only when
successful.
pop changes self only when successful.
Moreover all functions changing self change self only when successful.
smallContainer add support for free function pointer in sContainer, it
enables support for any baset class as element. The baset object are
stored in sContainers.
Add setLogStdout to enable/disable logging to stdout and add
getLogStdout to get the state.
Add openProgLogFile to open a log file with the program name.log.
Insert and inject create the list when it is empty and an element is
inserted.
Add staticBitsetInit macro.
Make freeO safe, it is now possible to do freeO(NULL)
Fix setFromO macro.
Fix writeFileG generic.
Add dataType and free function pointer in sContainer to support any
baset object.
Add commandOutf and logCommandOutf.
Change macros in libsheepyCSmallJsonInternal.h to have returns outside
the macros using goto pass nd goto fail, this allows having returns of
any type.
Add yaml for generating methods in smallArray, smallDict, smallJson and
smallString.
completion.txt | 146 +-
documentation.md | 28052 +++++++++++++++++++-----------
release/json/libsheepyCSmallArray.h | 116 +-
release/json/libsheepyCSmallContainer.h | 46 +-
release/json/libsheepyCSmallDict.h | 78 +-
release/json/libsheepyCSmallJson.h | 187 +-
release/json/libsheepyCSmallString.h | 46 +
release/libsheepy.c | 870 +-
release/libsheepy.h | 33 +-
release/libsheepyObject.h | 553 +-
release/libsheepySmall.c | 23 +-
release/libsheepySmall.h | 6 +
src/json/libsheepyCSmallArray.c | 3156 +++-
src/json/libsheepyCSmallArray.h | 116 +-
src/json/libsheepyCSmallContainer.c | 20 +-
src/json/libsheepyCSmallContainer.h | 46 +-
src/json/libsheepyCSmallDict.c | 1642 +-
src/json/libsheepyCSmallDict.h | 78 +-
src/json/libsheepyCSmallJson.c | 7430 +++++---
src/json/libsheepyCSmallJson.h | 187 +-
src/json/libsheepyCSmallJsonInternal.h | 33 +-
src/json/libsheepyCSmallString.c | 299 +-
src/json/libsheepyCSmallString.h | 46 +
src/json/libsheepyObject.c | 44 +-
src/json/libsheepyObjectTest.c | 62 +-
src/libsheepy.c | 884 +-
src/libsheepy.h | 33 +-
src/libsheepyObject.h | 553 +-
src/libsheepySmall.c | 23 +-
src/libsheepySmall.h | 6 +
src/libsheepyTest.c | 88 +-
31 files changed, 30332 insertions(+), 14570 deletions(-)
Diffstat:
31 files changed, 30332 insertions(+), 14570 deletions(-)
diff --git a/completion.txt b/completion.txt
@@ -193,6 +193,9 @@ int getLogMode(void)
void setLogMode(int mode)
bool getLogShortPath(void)
void setLogShortPath(bool shortPath)
+bool getLogStdout(void)
+void setLogStdout(bool state)
+bool openProgLogFile(void)
pLog(level, ...)
void _pLog(int, const char *, const char *, int, const char *, ...)
logP(...)
@@ -553,6 +556,10 @@ char *sliceS(const char *string, intmax_t start, intmax_t end)
char *iSliceS(char **string, intmax_t start, intmax_t end)
char *bSliceS(char *string, intmax_t start, intmax_t end)
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end)
+char *cropS(char *string, intmax_t start, intmax_t end)
+char *iCropS(char **string, intmax_t start, intmax_t end)
+char cropElemS(char *string, intmax_t index)
+char iCropElemS(char **string, intmax_t index)
char *insertS(const char *string, intmax_t index, const char *toInsert)
char *insertNFreeS(const char *string, intmax_t index, char *toInsert)
char *iInsertS(char **string, intmax_t index, const char *toInsert)
@@ -765,7 +772,9 @@ char **listAddS(char **list1, char **list2)
char **listSliceS(char **list, intmax_t start, intmax_t end)
char **iListCopyS(char **list, intmax_t start, intmax_t end)
char **iListSliceS(char ***list, intmax_t start, intmax_t end)
+char **listCropS(char **list, intmax_t start, intmax_t end)
char **iListCropS(char ***list, intmax_t start, intmax_t end)
+char *listCropElemS(char **list, intmax_t index)
char *iListCropElemS(char ***list, intmax_t index)
char **listInsertS(char **list, intmax_t index, char **toInsert)
char **iListInsertS(char ***list, intmax_t index, char **toInsert)
@@ -820,11 +829,11 @@ bool writeText(const char *filePath, char **list)
bool writeStream(FILE *fp, char **list)
bool appendText(const char *filePath, char **list)
char **execOut(const char *cmd)
-systemOut
-char **systemOutf(const char *fmt, ...)
execOutf
-int systemf(const char *fmt, ...)
execf
+char **systemOutf(const char *fmt, ...)
+systemOut
+int systemf(const char *fmt, ...)
logSystem(cmd)
logExec
logSystemOut(cmd)
@@ -840,10 +849,12 @@ int commandfF(int line, const char *thisFunc, const char *thisFileName, const ch
commandNFree(cmd)
int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFileName)
commandOut
+commandOutf
logCommand(cmd)
logCommandf(fmt, ...)
logCommandNFree(cmd)
logCommandOut
+logCommandOutf
bool listEqS(char **list1, char **list2)
bool listHasS(char **list, const char *string)
bool listHasCharS(char **list, char c)
@@ -1306,6 +1317,7 @@ slabWrite(a, file)
slabReadFilename(a, filename)
slabRead(a, file)
staticBitsetT(typeName, containerType, count)
+staticBitsetInit
staticBitsetCount(name)
staticBitsetClear(name)
staticBitsetBucket(name, index)
@@ -1406,7 +1418,7 @@ setValG
getPO(self)
getPG
setTopO(self, value)
-setFromO
+setFromO(self, value)
setFromG
setTopG(self, value)
setTopNFreeO(self, value)
@@ -1488,6 +1500,8 @@ writeFileO(self, filePath)
writeTextO(self, filePath)
writeFileG(self, path)
writeTextG(self, path)
+appendFileO(self, filePath)
+appendFileG(self, path)
zipO(self, keys, values)
zipG(self, keys, values)
walkDirG(returnType, path)
@@ -1550,6 +1564,15 @@ icUniqO(self)
icUniqG(self, c)
sliceO(self, start, end)
sliceG(self, start, end)
+cropO(self, start, end)
+cropG(self, start, end)
+cropElemO(self, index)
+cropElemG(self, returnType, index)
+cropSmallJsonO(self, start, end)
+cropElemAtSmallJsonO(self, index)
+cropElemKeySmallJsonO(self, key)
+cropSmallStringO(self, start, end)
+cropElemSmallStringO(self, index)
copyRngO(self, start, end)
copyRngG(self, start, end)
insertO(self, index, toInsert)
@@ -1751,6 +1774,40 @@ appendArrayO(self, array)
appendArrayG
appendNSmashArrayO(self, array)
appendNSmashArrayG
+cropElemUndefinedO(self, index)
+cropElemUndefinedG
+cropElemBoolO(self, index)
+cropElemBoolG
+cropElemDoubleO(self, index)
+cropElemDoubleG
+cropElemIntO(self, index)
+cropElemIntG
+cropElemInt32O(self, index)
+cropElemInt32G
+cropElemUintO(self, index)
+cropElemUintG
+cropElemUint32O(self, index)
+cropElemUint32G
+cropElemSO(self, index)
+cropElemSG
+cropElemDictO(self, index)
+cropElemDictG
+cropElemArrayO(self, index)
+cropElemArrayG
+cropElemSmallBoolO(self, index)
+cropElemSmallBoolG
+cropElemSmallBytesO(self, index)
+cropElemSmallBytesG
+cropElemSmallDoubleO(self, index)
+cropElemSmallDoubleG
+cropElemSmallIntO(self, index)
+cropElemSmallIntG
+cropElemSmallJsonO(self, index)
+cropElemSmallJsonG
+cropElemVoidO(self, index)
+cropElemVoidG
+cropElemSmallContainerO(self, index)
+cropElemSmallContainerG
injectUndefinedO(self, index)
injectUndefinedG
injectBoolO(self, index, toInject)
@@ -2079,8 +2136,6 @@ equalSmallIntO(self, p2)
equalSmallIntG
equalSmallStringO(self, p2)
equalSmallStringG
-appendFileO(self, filePath)
-appendFileG
appendFileSmallStringO(self, filePath)
appendFileSmallStringG
equalSmallBoolO(self, value)
@@ -2481,6 +2536,82 @@ mergeDictNSmashO(self, smallDict)
mergeDictNSmashG
addJsonO(self, array)
addJsonG
+cropSO(self, start, end)
+cropSG
+cropElemAtO(self, index)
+cropElemAtG
+cropElemAtUndefinedO(self, index)
+cropElemAtUndefinedG
+cropElemAtBoolO(self, index)
+cropElemAtBoolG
+cropElemAtDoubleO(self, index)
+cropElemAtDoubleG
+cropElemAtIntO(self, index)
+cropElemAtIntG
+cropElemAtInt32O(self, index)
+cropElemAtInt32G
+cropElemAtUintO(self, index)
+cropElemAtUintG
+cropElemAtUint32O(self, index)
+cropElemAtUint32G
+cropElemAtSO(self, index)
+cropElemAtSG
+cropElemAtCharO(self, index)
+cropElemAtCharG
+cropElemAtDictO(self, index)
+cropElemAtDictG
+cropElemAtArrayO(self, index)
+cropElemAtArrayG
+cropElemAtSmallBoolO(self, index)
+cropElemAtSmallBoolG
+cropElemAtSmallBytesO(self, index)
+cropElemAtSmallBytesG
+cropElemAtSmallDoubleO(self, index)
+cropElemAtSmallDoubleG
+cropElemAtSmallIntO(self, index)
+cropElemAtSmallIntG
+cropElemAtSmallStringO(self, index)
+cropElemAtSmallStringG
+cropElemAtVoidO(self, index)
+cropElemAtVoidG
+cropElemAtSmallContainerO(self, index)
+cropElemAtSmallContainerG
+cropElemKeyO(self, key)
+cropElemKeyG
+cropElemKeyUndefinedO(self, key)
+cropElemKeyUndefinedG
+cropElemKeyBoolO(self, key)
+cropElemKeyBoolG
+cropElemKeyDoubleO(self, key)
+cropElemKeyDoubleG
+cropElemKeyIntO(self, key)
+cropElemKeyIntG
+cropElemKeyInt32O(self, key)
+cropElemKeyInt32G
+cropElemKeyUintO(self, key)
+cropElemKeyUintG
+cropElemKeyUint32O(self, key)
+cropElemKeyUint32G
+cropElemKeySO(self, key)
+cropElemKeySG
+cropElemKeyDictO(self, key)
+cropElemKeyDictG
+cropElemKeyArrayO(self, key)
+cropElemKeyArrayG
+cropElemKeySmallBoolO(self, key)
+cropElemKeySmallBoolG
+cropElemKeySmallBytesO(self, key)
+cropElemKeySmallBytesG
+cropElemKeySmallDoubleO(self, key)
+cropElemKeySmallDoubleG
+cropElemKeySmallIntO(self, key)
+cropElemKeySmallIntG
+cropElemKeySmallStringO(self, key)
+cropElemKeySmallStringG
+cropElemKeyVoidO(self, key)
+cropElemKeyVoidG
+cropElemKeySmallContainerO(self, key)
+cropElemKeySmallContainerG
insertJsonO(self, index, toInsert)
insertJsonG
insertJsonNSmashO(self, index, toInsert)
@@ -2930,6 +3061,9 @@ bool writeTextSG(char **list, const char *filePath)
bool writeTextStreamG(char **list, FILE *fp)
bool writeTextCG(const char **list, const char *filePath)
bool writeTextStreamCG(const char **list, FILE *fp)
+bool appendFileSG(const char *string, const char *filePath)
+bool appendTextSG(char **list, const char *filePath)
+bool appendTextCG(const char **list, const char *filePath)
int mkdirParentsSmallJsonO(smallJsont* path)
int mkdirParentsO(smallStringt* path)
int rmAllSmallJsonO(smallJsont* path)
diff --git a/documentation.md b/documentation.md
@@ -224,6 +224,9 @@ int getLogMode(void)
void setLogMode(int mode)
bool getLogShortPath(void)
void setLogShortPath(bool shortPath)
+bool getLogStdout(void)
+void setLogStdout(bool state)
+bool openProgLogFile(void)
pLog(level, ...)
void _pLog(int, const char *, const char *, int, const char *, ...)
logP(...)
@@ -584,6 +587,10 @@ char *sliceS(const char *string, intmax_t start, intmax_t end)
char *iSliceS(char **string, intmax_t start, intmax_t end)
char *bSliceS(char *string, intmax_t start, intmax_t end)
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end)
+char *cropS(char *string, intmax_t start, intmax_t end)
+char *iCropS(char **string, intmax_t start, intmax_t end)
+char cropElemS(char *string, intmax_t index)
+char iCropElemS(char **string, intmax_t index)
char *insertS(const char *string, intmax_t index, const char *toInsert)
char *insertNFreeS(const char *string, intmax_t index, char *toInsert)
char *iInsertS(char **string, intmax_t index, const char *toInsert)
@@ -796,7 +803,9 @@ char **listAddS(char **list1, char **list2)
char **listSliceS(char **list, intmax_t start, intmax_t end)
char **iListCopyS(char **list, intmax_t start, intmax_t end)
char **iListSliceS(char ***list, intmax_t start, intmax_t end)
+char **listCropS(char **list, intmax_t start, intmax_t end)
char **iListCropS(char ***list, intmax_t start, intmax_t end)
+char *listCropElemS(char **list, intmax_t index)
char *iListCropElemS(char ***list, intmax_t index)
char **listInsertS(char **list, intmax_t index, char **toInsert)
char **iListInsertS(char ***list, intmax_t index, char **toInsert)
@@ -851,11 +860,11 @@ bool writeText(const char *filePath, char **list)
bool writeStream(FILE *fp, char **list)
bool appendText(const char *filePath, char **list)
char **execOut(const char *cmd)
-systemOut
-char **systemOutf(const char *fmt, ...)
execOutf
-int systemf(const char *fmt, ...)
execf
+char **systemOutf(const char *fmt, ...)
+systemOut
+int systemf(const char *fmt, ...)
logSystem(cmd)
logExec
logSystemOut(cmd)
@@ -871,10 +880,12 @@ int commandfF(int line, const char *thisFunc, const char *thisFileName, const ch
commandNFree(cmd)
int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFileName)
commandOut
+commandOutf
logCommand(cmd)
logCommandf(fmt, ...)
logCommandNFree(cmd)
logCommandOut
+logCommandOutf
bool listEqS(char **list1, char **list2)
bool listHasS(char **list, const char *string)
bool listHasCharS(char **list, char c)
@@ -1337,6 +1348,7 @@ slabWrite(a, file)
slabReadFilename(a, filename)
slabRead(a, file)
staticBitsetT(typeName, containerType, count)
+staticBitsetInit
staticBitsetCount(name)
staticBitsetClear(name)
staticBitsetBucket(name, index)
@@ -2019,6 +2031,12 @@ void setLogMode(int mode);
bool getLogShortPath(void);
// set log long/short file path value for VERBOSE mode
void setLogShortPath(bool shortPath);
+// get stdout state, when TRUE (default) all logs are printed to stdout
+bool getLogStdout(void);
+// enable/disable printing logs to stdout
+void setLogStdout(bool state);
+// log to a file named progName.log
+bool openProgLogFile(void);
/*
* print logging levels
*
@@ -2729,6 +2747,11 @@ char *sliceS(const char *string, intmax_t start, intmax_t end);
char *iSliceS(char **string, intmax_t start, intmax_t end);
char *bSliceS(char *string, intmax_t start, intmax_t end);
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end);
+// crop string (slice+del)
+char *cropS(char *string, intmax_t start, intmax_t end);
+char *iCropS(char **string, intmax_t start, intmax_t end);
+char cropElemS(char *string, intmax_t index);
+char iCropElemS(char **string, intmax_t index);
// insert string in string
char *insertS(const char *string, intmax_t index, const char *toInsert);
char *insertNFreeS(const char *string, intmax_t index, char *toInsert);
@@ -3077,7 +3100,9 @@ char **listSliceS(char **list, intmax_t start, intmax_t end);
char **iListCopyS(char **list, intmax_t start, intmax_t end);
char **iListSliceS(char ***list, intmax_t start, intmax_t end);
// crop list (slice+del)
+char **listCropS(char **list, intmax_t start, intmax_t end);
char **iListCropS(char ***list, intmax_t start, intmax_t end);
+char *listCropElemS(char **list, intmax_t index);
char *iListCropElemS(char ***list, intmax_t index);
// insert list in list
char **listInsertS(char **list, intmax_t index, char **toInsert);
@@ -3307,13 +3332,13 @@ bool appendText(const char *filePath, char **list);
// execOut
char **execOut(const char *cmd);
// convenience define
-#define systemOut execOut
+#define execOutf systemOutf
+#define execf systemf
// system command with formatting
char **systemOutf(const char *fmt, ...);
// convenience define
-#define execOutf systemOutf
+#define systemOut execOut
int systemf(const char *fmt, ...);
-#define execf systemf
// system commands and log
#define logSystem(cmd) do{\
#define logExec logSystem
@@ -3331,11 +3356,13 @@ int commandfF(int line, const char *thisFunc, const char *thisFileName, const ch
#define commandNFree(cmd) commandNFreeF(cmd, __LINE__, __func__, __FILE__)
int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFileName);
#define commandOut execOut
+#define commandOutf systemOutf
// log then run command and return exit code from command (not system return value like system, systemf and systemNFree)
#define logCommand(cmd) funcbegin\
#define logCommandf(fmt, ...) funcbegin\
#define logCommandNFree(cmd) funcbegin\
#define logCommandOut logExecOut
+#define logCommandOutf logExecOutf
// compare lists
bool listEqS(char **list1, char **list2);
// has
@@ -6124,7 +6151,7 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
*
* typeName bits;
*
- * staticBitsetClear(&bits);
+ * staticBitsetInit(&bits);
*
* staticBitset1(&bits, index);
*
@@ -6142,6 +6169,7 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
* count bit count in array
*/
#define staticBitsetT(typeName, containerType, count)\
+#define staticBitsetInit staticBitsetClear
/** bitset count */
#define staticBitsetCount(name) (sizeof((name)->map) * 8)
/** clear all bits in bitset */
@@ -6382,6 +6410,8 @@ static int _log_current_mode = LOG_DATE;
static bool _log_verbose_short_path = true;
+static bool _logToStdout = true;
+
// logging file 0 is stdout
static uint16_t _current_log_file = 1;
@@ -6493,6 +6523,27 @@ void setLogShortPath(bool shortPath)
/*
+ * get stdout state, when TRUE (default) all logs are printed to stdout
+ */
+bool getLogStdout(void)
+
+
+/*
+ * enable/disable printing logs to stdout
+ *
+ * TRUE: print logs to stdout
+ * FALSE: print logs to files only
+ */
+void setLogStdout(bool state)
+
+
+/*
+ * log to a file named progName.log
+ */
+bool openProgLogFile(void)
+
+
+/*
* print logging levels
* logs messages to all log file
*
@@ -8229,7 +8280,8 @@ char *bLFormatS(char *string, size_t stringSize, const char *fmt, ...)
* string2 string to append at the end of string1
* \return
* new string string1+string2 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string1 when string2 is NULL (you must free the pointer)
+ * NULL when string1 is NULL
*/
char *appendS(const char *string1, const char *string2)
@@ -8269,7 +8321,8 @@ char *appendSChar(char c, const char *string2)
* string2 string to append at the end of string1
* \return
* string1 modified string1 (realloc), string1+string2 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 no change when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iAppendS(char **string1, const char *string2)
@@ -8349,7 +8402,8 @@ char *bLAppendManySF(char *string, size_t stringSize, const char *paramType, ...
* string2 string to prepend at the beginning of string1
* \return
* new string string2+string1 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string2 when string1 is NULL (you must free the pointer)
+ * NULL when string2 is NULL
*/
char *prependS(const char *string1, const char *string2)
@@ -8387,8 +8441,9 @@ char *prependSChar(char c, const char *string2)
* string1 string, which is reallocated.
* string2 string to prepend at the beginning of string1
* \return
- * string1 modified string1, string2+string1 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 modified string1, string2+string1 (you must free the pointer)
+ * string1 when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iPrependS(char **string1, const char *string2)
@@ -10373,6 +10428,50 @@ char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end)
/*
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *cropS(char *string, intmax_t start, intmax_t end)
+
+
+/*
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *iCropS(char **string, intmax_t start, intmax_t end)
+
+
+/*
* insert string in string at index
*
* return new string with toInsert at index
@@ -10393,7 +10492,7 @@ char *insertS(const char *string, intmax_t index, const char *toInsert)
/*
- * insert string in string at index and free toInsert
+ * insert string in string at index and free toInsert when successful
*
* return new string with toInsert at index
* negative indexes are allowed
@@ -13506,7 +13605,32 @@ char **iListSliceS(char ***list, intmax_t start, intmax_t end)
* string pointers are copied to the sliced list
*
* \param
- * list (this parameter is reallocated)
+ * list
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free the pointer with listFreeS or free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char **listCropS(char **list, intmax_t start, intmax_t end)
+
+
+/*
+ * list Crop String
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelS because only the
+ * string pointers are copied to the sliced list
+ *
+ * \param
+ * list
* \param
* start index, must be in the list
* \param
@@ -13531,7 +13655,30 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end)
* string pointer is returned directly
*
* \param
- * list (this parameter is reallocated)
+ * list
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *listCropElemS(char **list, intmax_t index)
+
+
+/*
+ * list Crop Element String
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelElemS because only the
+ * string pointer is returned directly
+ *
+ * \param
+ * list
* \param
* index must be in the list
* \return
@@ -15110,7 +15257,7 @@ setValG
getPO(self)
getPG
setTopO(self, value)
-setFromO
+setFromO(self, value)
setFromG
setTopG(self, value)
setTopNFreeO(self, value)
@@ -15192,6 +15339,8 @@ writeFileO(self, filePath)
writeTextO(self, filePath)
writeFileG(self, path)
writeTextG(self, path)
+appendFileO(self, filePath)
+appendFileG(self, path)
zipO(self, keys, values)
zipG(self, keys, values)
walkDirG(returnType, path)
@@ -15254,6 +15403,15 @@ icUniqO(self)
icUniqG(self, c)
sliceO(self, start, end)
sliceG(self, start, end)
+cropO(self, start, end)
+cropG(self, start, end)
+cropElemO(self, index)
+cropElemG(self, returnType, index)
+cropSmallJsonO(self, start, end)
+cropElemAtSmallJsonO(self, index)
+cropElemKeySmallJsonO(self, key)
+cropSmallStringO(self, start, end)
+cropElemSmallStringO(self, index)
copyRngO(self, start, end)
copyRngG(self, start, end)
insertO(self, index, toInsert)
@@ -15455,6 +15613,40 @@ appendArrayO(self, array)
appendArrayG
appendNSmashArrayO(self, array)
appendNSmashArrayG
+cropElemUndefinedO(self, index)
+cropElemUndefinedG
+cropElemBoolO(self, index)
+cropElemBoolG
+cropElemDoubleO(self, index)
+cropElemDoubleG
+cropElemIntO(self, index)
+cropElemIntG
+cropElemInt32O(self, index)
+cropElemInt32G
+cropElemUintO(self, index)
+cropElemUintG
+cropElemUint32O(self, index)
+cropElemUint32G
+cropElemSO(self, index)
+cropElemSG
+cropElemDictO(self, index)
+cropElemDictG
+cropElemArrayO(self, index)
+cropElemArrayG
+cropElemSmallBoolO(self, index)
+cropElemSmallBoolG
+cropElemSmallBytesO(self, index)
+cropElemSmallBytesG
+cropElemSmallDoubleO(self, index)
+cropElemSmallDoubleG
+cropElemSmallIntO(self, index)
+cropElemSmallIntG
+cropElemSmallJsonO(self, index)
+cropElemSmallJsonG
+cropElemVoidO(self, index)
+cropElemVoidG
+cropElemSmallContainerO(self, index)
+cropElemSmallContainerG
injectUndefinedO(self, index)
injectUndefinedG
injectBoolO(self, index, toInject)
@@ -15783,8 +15975,6 @@ equalSmallIntO(self, p2)
equalSmallIntG
equalSmallStringO(self, p2)
equalSmallStringG
-appendFileO(self, filePath)
-appendFileG
appendFileSmallStringO(self, filePath)
appendFileSmallStringG
equalSmallBoolO(self, value)
@@ -16185,6 +16375,82 @@ mergeDictNSmashO(self, smallDict)
mergeDictNSmashG
addJsonO(self, array)
addJsonG
+cropSO(self, start, end)
+cropSG
+cropElemAtO(self, index)
+cropElemAtG
+cropElemAtUndefinedO(self, index)
+cropElemAtUndefinedG
+cropElemAtBoolO(self, index)
+cropElemAtBoolG
+cropElemAtDoubleO(self, index)
+cropElemAtDoubleG
+cropElemAtIntO(self, index)
+cropElemAtIntG
+cropElemAtInt32O(self, index)
+cropElemAtInt32G
+cropElemAtUintO(self, index)
+cropElemAtUintG
+cropElemAtUint32O(self, index)
+cropElemAtUint32G
+cropElemAtSO(self, index)
+cropElemAtSG
+cropElemAtCharO(self, index)
+cropElemAtCharG
+cropElemAtDictO(self, index)
+cropElemAtDictG
+cropElemAtArrayO(self, index)
+cropElemAtArrayG
+cropElemAtSmallBoolO(self, index)
+cropElemAtSmallBoolG
+cropElemAtSmallBytesO(self, index)
+cropElemAtSmallBytesG
+cropElemAtSmallDoubleO(self, index)
+cropElemAtSmallDoubleG
+cropElemAtSmallIntO(self, index)
+cropElemAtSmallIntG
+cropElemAtSmallStringO(self, index)
+cropElemAtSmallStringG
+cropElemAtVoidO(self, index)
+cropElemAtVoidG
+cropElemAtSmallContainerO(self, index)
+cropElemAtSmallContainerG
+cropElemKeyO(self, key)
+cropElemKeyG
+cropElemKeyUndefinedO(self, key)
+cropElemKeyUndefinedG
+cropElemKeyBoolO(self, key)
+cropElemKeyBoolG
+cropElemKeyDoubleO(self, key)
+cropElemKeyDoubleG
+cropElemKeyIntO(self, key)
+cropElemKeyIntG
+cropElemKeyInt32O(self, key)
+cropElemKeyInt32G
+cropElemKeyUintO(self, key)
+cropElemKeyUintG
+cropElemKeyUint32O(self, key)
+cropElemKeyUint32G
+cropElemKeySO(self, key)
+cropElemKeySG
+cropElemKeyDictO(self, key)
+cropElemKeyDictG
+cropElemKeyArrayO(self, key)
+cropElemKeyArrayG
+cropElemKeySmallBoolO(self, key)
+cropElemKeySmallBoolG
+cropElemKeySmallBytesO(self, key)
+cropElemKeySmallBytesG
+cropElemKeySmallDoubleO(self, key)
+cropElemKeySmallDoubleG
+cropElemKeySmallIntO(self, key)
+cropElemKeySmallIntG
+cropElemKeySmallStringO(self, key)
+cropElemKeySmallStringG
+cropElemKeyVoidO(self, key)
+cropElemKeyVoidG
+cropElemKeySmallContainerO(self, key)
+cropElemKeySmallContainerG
insertJsonO(self, index, toInsert)
insertJsonG
insertJsonNSmashO(self, index, toInsert)
@@ -16634,6 +16900,9 @@ bool writeTextSG(char **list, const char *filePath)
bool writeTextStreamG(char **list, FILE *fp)
bool writeTextCG(const char **list, const char *filePath)
bool writeTextStreamCG(const char **list, FILE *fp)
+bool appendFileSG(const char *string, const char *filePath)
+bool appendTextSG(char **list, const char *filePath)
+bool appendTextCG(const char **list, const char *filePath)
int mkdirParentsSmallJsonO(smallJsont* path)
int mkdirParentsO(smallStringt* path)
int rmAllSmallJsonO(smallJsont* path)
@@ -17203,6 +17472,25 @@ smallStringt* getNDupSmallStringKChar (smallDictt *self, char key);
void* getNDupVoidKChar (smallDictt *self, char key);
smallContainert* getNDupSmallContainerKChar(smallDictt *self, char key);
double getNum (smallDictt *self, const char *key);
+baset* cropElem (smallDictt *self, char* key);
+undefinedt* cropElemUndefined (smallDictt *self, char* key);
+bool cropElemBool (smallDictt *self, char* key);
+double cropElemDouble (smallDictt *self, char* key);
+int64_t cropElemInt (smallDictt *self, char* key);
+int32_t cropElemInt32 (smallDictt *self, char* key);
+uint64_t cropElemUint (smallDictt *self, char* key);
+uint32_t cropElemUint32 (smallDictt *self, char* key);
+char* cropElemS (smallDictt *self, char* key);
+smallDictt* cropElemDict (smallDictt *self, char* key);
+smallArrayt* cropElemArray (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBool (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytes (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDouble (smallDictt *self, char* key);
+smallIntt* cropElemSmallInt (smallDictt *self, char* key);
+smallJsont* cropElemSmallJson (smallDictt *self, char* key);
+smallStringt* cropElemSmallString (smallDictt *self, char* key);
+void* cropElemVoid (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainer (smallDictt *self, char* key);
smallDictt* del (smallDictt *self, const char *key);
smallDictt* delKChar (smallDictt *self, char key);
bool has (smallDictt *self, const char *key);
@@ -17441,6 +17729,26 @@ smallArrayt* shiftNSmash (smallArrayt *self, smallArrayt *array);
smallArrayt* shiftNSmashSmallJson(smallArrayt *self, smallJsont *json);
smallArrayt* add (smallArrayt *self, smallArrayt *array);
smallArrayt* slice (smallArrayt *self, intmax_t start, intmax_t end);
+smallArrayt* crop (smallArrayt *self, intmax_t start, intmax_t end);
+baset* cropElem (smallArrayt *self, intmax_t index);
+undefinedt* cropElemUndefined (smallArrayt *self, intmax_t index);
+bool cropElemBool (smallArrayt *self, intmax_t index);
+double cropElemDouble (smallArrayt *self, intmax_t index);
+int64_t cropElemInt (smallArrayt *self, intmax_t index);
+int32_t cropElemInt32 (smallArrayt *self, intmax_t index);
+uint64_t cropElemUint (smallArrayt *self, intmax_t index);
+uint32_t cropElemUint32 (smallArrayt *self, intmax_t index);
+char* cropElemS (smallArrayt *self, intmax_t index);
+smallDictt* cropElemDict (smallArrayt *self, intmax_t index);
+smallArrayt* cropElemArray (smallArrayt *self, intmax_t index);
+smallBoolt* cropElemSmallBool (smallArrayt *self, intmax_t index);
+smallBytest* cropElemSmallBytes (smallArrayt *self, intmax_t index);
+smallDoublet* cropElemSmallDouble (smallArrayt *self, intmax_t index);
+smallIntt* cropElemSmallInt (smallArrayt *self, intmax_t index);
+smallJsont* cropElemSmallJson (smallArrayt *self, intmax_t index);
+smallStringt* cropElemSmallString (smallArrayt *self, intmax_t index);
+void* cropElemVoid (smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainer (smallArrayt *self, intmax_t index);
smallArrayt* copy (smallArrayt *self, intmax_t start, intmax_t end);
smallArrayt* insert (smallArrayt *self, intmax_t index, smallArrayt *toInsert);
smallArrayt* insertSmallJson (smallArrayt *self, intmax_t index, smallJsont *toInsert);
@@ -18099,6 +18407,48 @@ smallJsont* shiftNSmash(smallJsont *self, smallJsont *array);
smallJsont* add (smallJsont *self, smallArrayt *array);
smallJsont* addJson (smallJsont *self, smallJsont *array);
smallJsont* slice (smallJsont *self, intmax_t start, intmax_t end);
+smallJsont* crop (smallJsont *self, intmax_t start, intmax_t end);
+char* cropS (smallJsont *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallString (smallJsont *self, intmax_t start, intmax_t end);
+baset* cropElemAt (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefined (smallJsont *self, intmax_t index);
+bool cropElemAtBool (smallJsont *self, intmax_t index);
+double cropElemAtDouble (smallJsont *self, intmax_t index);
+int64_t cropElemAtInt (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32 (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUint (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32 (smallJsont *self, intmax_t index);
+char* cropElemAtS (smallJsont *self, intmax_t index);
+char cropElemAtChar (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDict (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArray (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBool (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytes (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDouble (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallInt (smallJsont *self, intmax_t index);
+smallJsont* cropElemAt (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallString (smallJsont *self, intmax_t index);
+void* cropElemAtVoid (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainer (smallJsont *self, intmax_t index);
+baset* cropElemKey (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefined (smallJsont *self, char* key);
+bool cropElemKeyBool (smallJsont *self, char* key);
+double cropElemKeyDouble (smallJsont *self, char* key);
+int64_t cropElemKeyInt (smallJsont *self, char* key);
+int32_t cropElemKeyInt32 (smallJsont *self, char* key);
+uint64_t cropElemKeyUint (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32 (smallJsont *self, char* key);
+char* cropElemKeyS (smallJsont *self, char* key);
+smallDictt* cropElemKeyDict (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArray (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBool (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytes (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDouble (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallInt (smallJsont *self, char* key);
+smallJsont* cropElemKey (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallString (smallJsont *self, char* key);
+void* cropElemKeyVoid (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainer (smallJsont *self, char* key);
smallJsont* copy (smallJsont *self, intmax_t start, intmax_t end);
smallJsont* insert (smallJsont *self, intmax_t index, smallArrayt *toInsert);
smallJsont* insertNSmash (smallJsont *self, intmax_t index, smallArrayt *toInsert);
@@ -18871,6 +19221,10 @@ smallStringt* icUniq (smallStringt *self, char c);
char getAt (smallStringt *self, intmax_t index);
smallStringt* setAt (smallStringt *self, intmax_t index, char c);
smallStringt* slice (smallStringt *self, intmax_t start, intmax_t end);
+smallStringt* crop(smallStringt *self, intmax_t start, intmax_t end);
+char* cropS(smallStringt *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJson(smallStringt *self, intmax_t start, intmax_t end);
+char cropElem(smallStringt *self, intmax_t index);
smallStringt* copy (smallStringt *self, intmax_t start, intmax_t end);
smallStringt* insert (smallStringt *self, intmax_t index, smallStringt *toInsert);
smallStringt* insertSmallJson (smallStringt *self, intmax_t index, smallJsont *toInsert);
@@ -19004,7 +19358,7 @@ smallJsont* allocSmallJsonG(smallJsont *self UNUSED);
/*
* free buffers in obj
*/
-#define freeO(obj) (obj)->f->free(obj)
+#define freeO(obj) MACRO(\
#define freeG(self)
/*
* free many buffers in baset objects
@@ -19015,7 +19369,7 @@ void freeManyOF(void *paramType, ...);
/*
* free buffers and obj itself
*/
-#define terminateO(obj) if (obj) {(obj)->f->terminate(&(obj));}
+#define terminateO(obj) MACRO (\
#define terminateG terminateO
/*
* terminate many baset objects
@@ -19097,7 +19451,7 @@ void terminateManyOF(void *paramType, ...);
/*
* free object and keep data
*/
-#define smashO(obj) (obj)->f->smash(&obj)
+#define smashO(obj) MACRO(\
#define smashG smashO
/*
* free self but not the elements
@@ -19174,7 +19528,7 @@ void smashManyOF(void *paramType, ...);
/*
* free container only
*/
-#define finishO(obj) if (obj) {(obj)->f->finish(&(obj));}
+#define finishO(obj) MACRO(\
#define finishG finishO
/*
* free container
@@ -19316,7 +19670,7 @@ double* getPSmallDouble (smallDoublet *self);
*/
int64_t* getPSmallInt (smallIntt *self);
#define setTopO(self, value) (self)->f->setTop(self, value)
-#define setFromO (self)->f->set(self, value)
+#define setFromO(self, value) (self)->f->set(self, value)
#define setFromG setTopG
#define setTopG(self, value)
smallArrayt* setFromSmallArrayG(smallArrayt *self, char **array);
@@ -20310,11 +20664,14 @@ smallStringt* getTopSmallStringSmallJsonG(smallJsont *self,smallStringt* retType
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallArray (smallArrayt *self, baset *value);
smallArrayt* pushSmallArrayG (smallArrayt *self, baset *value);
@@ -20335,11 +20692,14 @@ smallArrayt* pushSmallArrayG (smallArrayt *self, baset *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushBoolSmallArray (smallArrayt *self, bool value);
smallArrayt* pushBoolSmallArrayG (smallArrayt *self, bool value);
@@ -20360,11 +20720,14 @@ smallArrayt* pushBoolSmallArrayG (smallArrayt *self, bool value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushDoubleSmallArray (smallArrayt *self, double value);
smallArrayt* pushDoubleSmallArrayG (smallArrayt *self, double value);
@@ -20385,11 +20748,14 @@ smallArrayt* pushDoubleSmallArrayG (smallArrayt *self, double value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -20410,11 +20776,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -20435,11 +20804,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -20460,11 +20832,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -20485,11 +20860,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSSmallArray (smallArrayt *self, const char *string);
smallArrayt* pushSSmallArrayG (smallArrayt *self, const char *string);
@@ -20510,11 +20888,14 @@ smallArrayt* pushSSmallArrayG (smallArrayt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
smallArrayt* pushCharSmallArrayG (smallArrayt *self, char c);
@@ -20535,11 +20916,14 @@ smallArrayt* pushCharSmallArrayG (smallArrayt *self, char c);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSSmallArray (smallArrayt *self, const char *string);
smallArrayt* pushSSmallArrayG (smallArrayt *self, const char *string);
@@ -20560,11 +20944,14 @@ smallArrayt* pushSSmallArrayG (smallArrayt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushDictSmallArray (smallArrayt *self, smallDictt *dict);
smallArrayt* pushDictSmallArrayG (smallArrayt *self, smallDictt *dict);
@@ -20585,11 +20972,14 @@ smallArrayt* pushDictSmallArrayG (smallArrayt *self, smallDictt *dict);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushArraySmallArray (smallArrayt *self, smallArrayt *array);
smallArrayt* pushArraySmallArrayG (smallArrayt *self, smallArrayt *array);
@@ -20610,11 +21000,14 @@ smallArrayt* pushArraySmallArrayG (smallArrayt *self, smallArrayt *array);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushArraycSmallArray (smallArrayt *self, char **array);
smallArrayt* pushArraycSmallArrayG (smallArrayt *self, char **array);
@@ -20636,11 +21029,14 @@ smallArrayt* pushCArraycSmallArrayG (smallArrayt *self, const char **array);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
smallArrayt* pushSmallBoolSmallArrayG (smallArrayt *self, smallBoolt *value);
@@ -20661,11 +21057,14 @@ smallArrayt* pushSmallBoolSmallArrayG (smallArrayt *self, smallBoolt *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
smallArrayt* pushSmallBytesSmallArrayG (smallArrayt *self, smallBytest *value);
@@ -20686,11 +21085,14 @@ smallArrayt* pushSmallBytesSmallArrayG (smallArrayt *self, smallBytest *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
smallArrayt* pushSmallDoubleSmallArrayG (smallArrayt *self, smallDoublet *value);
@@ -20711,11 +21113,14 @@ smallArrayt* pushSmallDoubleSmallArrayG (smallArrayt *self, smallDoublet *value)
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallIntSmallArray (smallArrayt *self, smallIntt *value);
smallArrayt* pushSmallIntSmallArrayG (smallArrayt *self, smallIntt *value);
@@ -20736,11 +21141,14 @@ smallArrayt* pushSmallIntSmallArrayG (smallArrayt *self, smallIntt *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallJsonSmallArray (smallArrayt *self, smallJsont *value);
smallArrayt* pushSmallJsonSmallArrayG (smallArrayt *self, smallJsont *value);
@@ -20761,11 +21169,14 @@ smallArrayt* pushSmallJsonSmallArrayG (smallArrayt *self, smallJsont *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallStringSmallArray (smallArrayt *self, smallStringt *string);
smallArrayt* pushSmallStringSmallArrayG (smallArrayt *self, smallStringt *string);
@@ -20786,11 +21197,14 @@ smallArrayt* pushSmallStringSmallArrayG (smallArrayt *self, smallStringt *string
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushSmallContainerSmallArray (smallArrayt *self, smallContainert *container);
smallArrayt* pushSmallContainerSmallArrayG(smallArrayt *self, smallContainert *container);
@@ -20811,11 +21225,14 @@ smallArrayt* pushSmallContainerSmallArrayG(smallArrayt *self, smallContainert *c
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushUndefinedSmallArray (smallArrayt *self);
smallArrayt* pushUndefinedSmallArrayG(smallArrayt *self, void *value UNUSED);
@@ -21311,11 +21728,14 @@ smallArrayt* pushNFreeSmallArrayG (smallArrayt *self, baset *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushBoolSmallArray (smallArrayt *self, bool value);
smallArrayt* pushBoolSmallArrayG (smallArrayt *self, bool value);
@@ -21336,11 +21756,14 @@ smallArrayt* pushBoolSmallArrayG (smallArrayt *self, bool value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushDoubleSmallArray (smallArrayt *self, double value);
smallArrayt* pushDoubleSmallArrayG (smallArrayt *self, double value);
@@ -21361,11 +21784,14 @@ smallArrayt* pushDoubleSmallArrayG (smallArrayt *self, double value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -21386,11 +21812,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -21411,11 +21840,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -21436,11 +21868,14 @@ smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushIntSmallArray (smallArrayt *self, int64_t value);
smallArrayt* pushIntSmallArrayG (smallArrayt *self, int64_t value);
@@ -21472,11 +21907,14 @@ smallArrayt* pushNFreeSSmallArrayG (smallArrayt *self, char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
smallArrayt* pushCharSmallArrayG (smallArrayt *self, char c);
@@ -23848,6 +24286,9 @@ smallDictt* setVoidSmallDictG (smallDictt *self, const char *key, void *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -23876,6 +24317,9 @@ smallArrayt* setAtSmallArrayG (smallArrayt *self, intmax_t index, baset *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -23904,6 +24348,9 @@ smallArrayt* setAtBoolSmallArrayG (smallArrayt *self, intmax_t index, bool value
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -23932,6 +24379,9 @@ smallArrayt* setAtDoubleSmallArrayG (smallArrayt *self, intmax_t index, double v
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -23960,6 +24410,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -23988,6 +24441,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24016,6 +24472,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24044,6 +24503,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24072,6 +24534,9 @@ smallArrayt* setAtSSmallArrayG (smallArrayt *self, intmax_t index, const char *s
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24100,6 +24565,9 @@ smallArrayt* setAtCharSmallArrayG (smallArrayt *self, intmax_t index, char c);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24128,6 +24596,9 @@ smallArrayt* setAtSSmallArrayG (smallArrayt *self, intmax_t index, const char *s
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24156,6 +24627,9 @@ smallArrayt* setAtDictSmallArrayG (smallArrayt *self, intmax_t index, smallDictt
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24184,6 +24658,9 @@ smallArrayt* setAtArraySmallArrayG (smallArrayt *self, intmax_t index, smallArra
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24213,6 +24690,9 @@ smallArrayt* setAtCArraycSmallArrayG (smallArrayt *self, intmax_t index, const c
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24241,6 +24721,9 @@ smallArrayt* setAtSmallBoolSmallArrayG (smallArrayt *self, intmax_t index, small
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24269,6 +24752,9 @@ smallArrayt* setAtSmallBytesSmallArrayG (smallArrayt *self, intmax_t index, smal
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24297,6 +24783,9 @@ smallArrayt* setAtSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index, sma
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24325,6 +24814,9 @@ smallArrayt* setAtSmallIntSmallArrayG (smallArrayt *self, intmax_t index, smallI
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24353,6 +24845,9 @@ smallArrayt* setAtSmallJsonSmallArrayG (smallArrayt *self, intmax_t index, small
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24381,6 +24876,9 @@ smallArrayt* setAtSmallStringSmallArrayG (smallArrayt *self, intmax_t index, sma
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -24409,6 +24907,9 @@ smallArrayt* setAtSmallContainerSmallArrayG(smallArrayt *self, intmax_t index, s
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31614,6 +32115,9 @@ smallArrayt* setAtNFreeSmallArrayG (smallArrayt *self, intmax_t index, baset *va
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31642,6 +32146,9 @@ smallArrayt* setAtBoolSmallArrayG (smallArrayt *self, intmax_t index, bool value
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31670,6 +32177,9 @@ smallArrayt* setAtDoubleSmallArrayG (smallArrayt *self, intmax_t index, double v
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31698,6 +32208,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31726,6 +32239,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -31754,6 +32270,9 @@ smallArrayt* setAtIntSmallArrayG (smallArrayt *self, intmax_t index, int64_t val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -47009,6 +47528,9 @@ smallStringt* appendSSmallStringG (smallStringt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47033,6 +47555,9 @@ smallArrayt* prependSmallArrayG (smallArrayt *self, baset *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47057,6 +47582,9 @@ smallArrayt* prependBoolSmallArrayG (smallArrayt *self, bool value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47081,6 +47609,9 @@ smallArrayt* prependDoubleSmallArrayG (smallArrayt *self, double value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47105,6 +47636,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47129,6 +47663,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47153,6 +47690,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47177,6 +47717,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47201,6 +47744,9 @@ smallArrayt* prependSSmallArrayG (smallArrayt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47225,6 +47771,9 @@ smallArrayt* prependCharSmallArrayG (smallArrayt *self, char c);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47249,6 +47798,9 @@ smallArrayt* prependSSmallArrayG (smallArrayt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47273,6 +47825,9 @@ smallArrayt* prependDictSmallArrayG (smallArrayt *self, smallDictt *dict);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47297,6 +47852,9 @@ smallArrayt* prependArraySmallArrayG (smallArrayt *self, smallArrayt *array);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47322,6 +47880,9 @@ smallArrayt* prependCArraycSmallArrayG (smallArrayt *self, const char **array);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47346,6 +47907,9 @@ smallArrayt* prependSmallBoolSmallArrayG (smallArrayt *self, smallBoolt *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47370,6 +47934,9 @@ smallArrayt* prependSmallBytesSmallArrayG (smallArrayt *self, smallBytest *value
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47394,6 +47961,9 @@ smallArrayt* prependSmallDoubleSmallArrayG (smallArrayt *self, smallDoublet *val
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47418,6 +47988,9 @@ smallArrayt* prependSmallIntSmallArrayG (smallArrayt *self, smallIntt *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47442,6 +48015,9 @@ smallArrayt* prependSmallJsonSmallArrayG (smallArrayt *self, smallJsont *json);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47466,6 +48042,9 @@ smallArrayt* prependSmallStringSmallArrayG (smallArrayt *self, smallStringt *str
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -47490,6 +48069,9 @@ smallArrayt* prependSmallContainerSmallArrayG(smallArrayt *self, smallContainert
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48107,6 +48689,9 @@ smallStringt* prependSSmallStringG (smallStringt *self, const char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48131,6 +48716,9 @@ smallArrayt* prependNFreeSmallArrayG (smallArrayt *self, baset *value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48155,6 +48743,9 @@ smallArrayt* prependBoolSmallArrayG (smallArrayt *self, bool value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48179,6 +48770,9 @@ smallArrayt* prependDoubleSmallArrayG (smallArrayt *self, double value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48203,6 +48797,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48227,6 +48824,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48251,6 +48851,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48275,6 +48878,9 @@ smallArrayt* prependIntSmallArrayG (smallArrayt *self, int64_t value);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48299,6 +48905,9 @@ smallArrayt* prependNFreeSSmallArrayG (smallArrayt *self, char *string);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48323,6 +48932,9 @@ smallArrayt* prependCharSmallArrayG (smallArrayt *self, char c);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48347,6 +48959,9 @@ smallArrayt* prependNFreeDictSmallArrayG (smallArrayt *self, smallDictt *dict);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48371,6 +48986,9 @@ smallArrayt* prependNFreeArraySmallArrayG (smallArrayt *self, smallArrayt *array
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48395,6 +49013,9 @@ smallArrayt* prependNFreeArraycSmallArrayG (smallArrayt *self, char **array);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48419,6 +49040,9 @@ smallArrayt* prependNFreeSmallBoolSmallArrayG (smallArrayt *self, smallBoolt *va
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48443,6 +49067,9 @@ smallArrayt* prependNFreeSmallBytesSmallArrayG (smallArrayt *self, smallBytest *
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48467,6 +49094,9 @@ smallArrayt* prependNFreeSmallDoubleSmallArrayG (smallArrayt *self, smallDoublet
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48491,6 +49121,9 @@ smallArrayt* prependNFreeSmallIntSmallArrayG (smallArrayt *self, smallIntt *valu
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48515,6 +49148,9 @@ smallArrayt* prependNFreeSmallJsonSmallArrayG (smallArrayt *self, smallJsont *js
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48539,6 +49175,9 @@ smallArrayt* prependNFreeSmallStringSmallArrayG (smallArrayt *self, smallStringt
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -48563,6 +49202,9 @@ smallArrayt* prependNFreeSmallContainerSmallArrayG (smallArrayt *self, smallCont
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -52278,7 +52920,200 @@ bool writeTextJsonSmallJsonG (smallJsont *self, smallJsont *filePath);
*/
bool writeTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
bool writeTextSmallStringSmallJsonG (smallJsont *self, smallStringt *filePath);
-//TODO #define appendFileG(self, path)
+#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
+#define appendFileG(self, path)
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+bool appendTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
+/*
+ * append self to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or smallBytes are NULL
+ */
+int appendFileSmallBytes(smallBytest *self, const char *filePath);
+int appendFileSmallBytesG(smallBytest *self, const char *filePath);
+/*
+ * append self to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or smallBytes are NULL
+ */
+int appendFileSmallBytes(smallBytest *self, const char *filePath);
+int appendFileSmallBytesG(smallBytest *self, const char *filePath);
+/*
+ * append self to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or smallBytes are NULL
+ */
+int appendFileSmallStringSmallBytes(smallBytest *self, smallStringt *filePath);
+int appendFileSmallStringSmallBytesG(smallBytest *self, smallStringt *filePath);
+/*
+ * append self to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or smallBytes are NULL
+ */
+int appendFileSmallBytes(smallBytest *self, const char *filePath);
+int appendFileSmallBytesG(smallBytest *self, const char *filePath);
+/*
+ * append dictionary to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or dict are NULL
+ */
+bool appendFileSmallDict (smallDictt *self, const char *filePath);
+bool appendFileSmallDictG (smallDictt *self, const char *filePath);
+/*
+ * append dictionary to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or dict are NULL
+ */
+bool appendFileSmallDict (smallDictt *self, const char *filePath);
+bool appendFileSmallDictG (smallDictt *self, const char *filePath);
+/*
+ * append dictionary to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or dict are NULL
+ */
+bool appendFileSmallStringSmallDict(smallDictt *self, smallStringt *filePath);
+bool appendFileSmallStringSmallDictG (smallDictt *self, smallStringt *filePath);
+/*
+ * append dictionary to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or dict are NULL
+ */
+bool appendFileSmallDict (smallDictt *self, const char *filePath);
+bool appendFileSmallDictG (smallDictt *self, const char *filePath);
+/*
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
+ */
+int appendFileSmallJson (smallJsont *self, const char *filePath);
+int appendFileSmallJsonG (smallJsont *self, const char *filePath);
+/*
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
+ */
+int appendFileSmallJson (smallJsont *self, const char *filePath);
+int appendFileSmallJsonG (smallJsont *self, const char *filePath);
+/*
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
+ */
+int appendFileSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+int appendFileSmallStringSmallJsonG(smallJsont *self, smallStringt *filePath);
+/*
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
+ */
+int appendFileJsonSmallJson (smallJsont *self, smallJsont *filePath);
+int appendFileJsonSmallJsonG (smallJsont *self, smallJsont *filePath);
//TODO typeStringSmallArray rtChar rtSmallStringt
//TODO typeStringsSmallArray
//TODO keys rtChar rtSmallArrayt
@@ -52924,16107 +53759,22187 @@ smallJsont* sliceSmallJsonG(smallJsont *self, intmax_t start, intmax_t end);
*/
smallStringt* sliceSmallString (smallStringt *self, intmax_t start, intmax_t end);
smallStringt* sliceSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
-#define copyRngO(self, start, end) (self)->f->copy(self, start, end)
-#define copyRngG(self, start, end)
-/*
- * keep elements from start and end in list, free the other elements
+#define cropO(self, start, end) (self)->f->crop(self, start, end)
+#define cropG(self, start, end)
+#define cropElemO(self, index) (self)->f->cropElem(self, index)
+#define cropElemG(self, returnType, index)
+/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
* negative indexes are allowed
*
* \param
- * start index, must be in the list
- * \param
- * end index, must be in the list
+ * key must exist in the dictionary
* \return
- * new sliced list
- * empty list when start=end
- * unchanged when list is empty
- * unchanged when list is NULL or when start and end are not set correctly
+ * element for key (you must free the pointer (terminate libsheepy objects))
* NULL error
*/
-smallArrayt* copySmallArray (smallArrayt *self, intmax_t start, intmax_t end);
-smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
+baset* cropElemSmallDict (smallDictt *self, char* key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
/*
- * keep elements from start and end in list, free the other elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
* negative indexes are allowed
*
* \param
- * start index, must be in the list
- * \param
- * end index, must be in the list
+ * key must exist in the dictionary
* \return
- * new sliced list
- * empty list when start=end
- * unchanged when list is empty
- * unchanged when list is NULL or when start and end are not set correctly
+ * element for key (you must free the pointer (terminate libsheepy objects))
* NULL error
*/
-smallJsont* copySmallJson (smallJsont *self, intmax_t start, intmax_t end);
-smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+undefinedt* cropElemUndefinedSmallDict (smallDictt *self, char* key);
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key);
/*
- * copy string between start and end
- * self becomes the smallString between start and end
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
* negative indexes are allowed
*
* \param
- * start: start index, must be in the smallString
- * \param
- * end: end index, must be in the smallString after start
+ * key must exist in the dictionary
* \return
- * new sliced smallString
- * "" when start=end
- * NULL when start and end are not set correctly
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* copySmallString (smallStringt *self, intmax_t start, intmax_t end);
-smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end);
-#define insertO(self, index, toInsert) (self)->f->insert(self, index, toInsert)
-#define insertG(self, index, toInsert)
-#define insertNSmashO(self, index, toInsert) (self)->f->insertNSmash(self, index, toInsert)
-#define insertNFreeO insertNSmashO
-#define insertNFreeG insertNSmashG
+bool cropElemBoolSmallDict (smallDictt *self, char* key);
+bool cropElemBoolSmallDictG (smallDictt *self, char* key);
/*
- * insert smallString in self at index
- *
- * return smallString with toInsert at index
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
* negative indexes are allowed
- * index -1 is the end of the array and is equivalent to index len
*
* \param
- * index in smallString
- * \param
- * toInsert smallString
+ * key must exist in the dictionary
* \return
- * self smallString
- * NULL unchanged smallString when smallString is NULL or invalid index
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* insertNFreeSmallString (smallStringt *self, intmax_t index, smallStringt *toInsert);
-#define insertNSmashG(self, index, toInsert)
-#define injectG(self, index, value)
-#define injectNFreeG(self, index, value)
-#define findO(self, needle) (self)->f->find(self, needle)
-#define findG(self, needle)
-#define hasO(self, key) (self)->f->has(self, key)
-#define hasG(self, needle)
-#define indexOfO(self, key) (self)->f->indexOf(self, key)
-#define indexOfG(self, needle)
-#define keyByO(self, value) (self)->f->keyBy(self, value)
-#define keyByG(self, needle)
-#define icFindO(self, needle) (self)->f->icFind(self, needle)
-#define icFindG(self, needle)
-#define icHasO(self, key) (self)->f->icHas(self, key)
-#define icHasG(self, needle)
-#define icIndexOfO(self, key) (self)->f->icIndexOf(self, key)
-#define icIndexOfG(self, needle)
-#define icKeyByO(self, value) (self)->f->icKeyBy(self, value)
-#define icKeyByG(self, needle)
-#define emptyO(self) (self)->f->empty(self)
-#define emptyG(self)
-#define isEmptyO(self) (self)->f->isEmpty(self)
-#define isEmptyG(self)
+double cropElemDoubleSmallDict (smallDictt *self, char* key);
+double cropElemDoubleSmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when self is empty (len=0)
- * false when len > 0
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallArray (smallArrayt *self);
-bool isEmptySmallArrayG (smallArrayt *self);
+int64_t cropElemIntSmallDict (smallDictt *self, char* key);
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when self is empty (len=0)
- * false when len > 0
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallBytes(smallBytest *self);
-bool isEmptySmallBytesG(smallBytest *self);
+int32_t cropElemInt32SmallDict (smallDictt *self, char* key);
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when self is empty (len=0)
- * false when len > 0
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallDict (smallDictt *self);
-bool isEmptySmallDictG (smallDictt *self);
+uint64_t cropElemUintSmallDict (smallDictt *self, char* key);
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when self is empty (len=0)
- * false when len > 0
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallJson (smallJsont *self);
-bool isEmptySmallJsonG (smallJsont *self);
+uint32_t cropElemUint32SmallDict (smallDictt *self, char* key);
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key);
/*
- * is Empty SmallString
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * false when there are characters in the smallString
- * true when smallString is empty
- * true when smallString is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallString (smallStringt *self);
-bool isEmptySmallStringG (smallStringt *self);
-#define isBlankO(self) (self)->f->isBlank(self)
-#define isBlankG(self)
+char* cropElemSSmallDict (smallDictt *self, char* key);
+char* cropElemSSmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when all elements in self are blank
- * false when there is non blank element
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isBlankSmallArray (smallArrayt *self);
-bool isBlankSmallArrayG (smallArrayt *self);
+smallDictt* cropElemDictSmallDict (smallDictt *self, char* key);
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when self is empty (len=0)
- * false when len > 0
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isEmptySmallDict (smallDictt *self);
-bool isEmptySmallDictG (smallDictt *self);
+smallArrayt* cropElemArraySmallDict (smallDictt *self, char* key);
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key);
/*
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
* \return
- * true when all elements in self are blank
- * false when there is non blank element
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isBlankSmallJson (smallJsont *self);
-bool isBlankSmallJsonG (smallJsont *self);
+smallBoolt* cropElemSmallBoolSmallDict (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key);
/*
- * is Blank SmallString
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * false when there are non white space characters in the smallString
- * true when there are only white spaces in the smallString
- * true when smallString is empty
- * true when smallString is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool isBlankSmallString (smallStringt *self);
-bool isBlankSmallStringG (smallStringt *self);
-#define fromArrayO(self, array, size) (self)->f->fromArray(self, array, size)
-#define fromArrayG(self, array, size)
-#define splitO(self, delim) (self)->f->split(self, delim)
-#define splitG(self, delim)
-//TODO create splitS generic
-#define icSplitO(self, delim) (self)->f->icSplit(self, delim)
-#define icSplitG(self, delim)
-#define joinO(self, delim) (self)->f->join(self, delim)
-#define joinG(self, delim)
-#define joinSO(self, delim) (self)->f->join(self, delim)
-#define joinSG(self, delim)
-#define extractO(self, delim1, delim2) (self)->f->extract(self, delim1, delim2)
-#define extractG(self, delim1, delim2)
-#define icExtractO(self, delim1, delim2) (self)->f->icExtract(self, delim1, delim2)
-#define icExtractG(self, delim1, delim2)
-#define reverseO(self) (self)->f->reverse(self)
-#define reverseG(self)
+smallBytest* cropElemSmallBytesSmallDict (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key);
/*
- * reverse list, the last element is the first element of the list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * reversed list
- * nothing when list is NULL
- * 0 success
- * -1 error
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* reverseSmallArray (smallArrayt *self);
-smallArrayt* reverseSmallArrayG (smallArrayt *self);
+smallDoublet* cropElemSmallDoubleSmallDict (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key);
/*
- * reverse list, the last element is the first element of the list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * reversed list
- * nothing when list is NULL
- * 0 success
- * -1 error
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* reverseSmallJson (smallJsont *self);
-smallJsont* reverseSmallJsonG (smallJsont *self);
-#define addO(self, array) (self)->f->add(self, array)
-#define addG(self, list)
-#define sortO(self) (self)->f->sort(self)
-#define sortG(self)
+smallIntt* cropElemSmallIntSmallDict (smallDictt *self, char* key);
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key);
/*
- * sort self in alphabetic order
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * sorted list
- * empty list when list is empty
- * unchanged list when list is NULL
- * 0 success
- * -1 error
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* sortSmallArray (smallArrayt *self);
-smallArrayt* sortSmallArrayG (smallArrayt *self);
+smallJsont* cropElemSmallJsonSmallDict (smallDictt *self, char* key);
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key);
/*
- * sort self in alphabetic order
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * sorted list
- * empty list when list is empty
- * unchanged list when list is NULL
- * 0 success
- * -1 error
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* sortSmallJson (smallJsont *self);
-smallJsont* sortSmallJsonG (smallJsont *self);
-#define binarySearchO(self, value) (self)->f->binarySearch(self, value)
-#define binarySearchG(self, string)
-#define icSortO(self) (self)->f->icSort(self)
-#define icSortG(self)
-#define icBinarySearchO(self, value) (self)->f->icBinarySearch(self, value)
-#define icBinarySearchG(self, string)
-#define compactO(self) (self)->f->compact(self)
-#define compactG(self)
-#define parseO(self, input) (self)->f->parse(self, input)
-#define parseG(self, input)
+smallStringt* cropElemSmallStringSmallDict (smallDictt *self, char* key);
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallJson (smallJsont *self, char *input);
+void* cropElemVoidSmallDict (smallDictt *self, char* key);
+void* cropElemVoidSmallDictG (smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseSmallJsonG (smallJsont *self, char *input);
+smallContainert* cropElemSmallContainerSmallDict (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallJson (smallJsont *self, char *input);
+baset* cropElemSmallDict (smallDictt *self, char* key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseSmallJsonG (smallJsont *self, char *input);
+baset* cropElemSmallDict (smallDictt *self, char* key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseSmallJsonSmallJsonG (smallJsont *self, smallJsont *input);
+undefinedt* cropElemUndefinedSmallDict (smallDictt *self, char* key);
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key);
/*
- * parse a smallJson string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseSmallStringSmallJson(smallJsont *self, smallStringt *input);
-bool parseSmallStringSmallJsonG (smallJsont *self, smallStringt *input);
-#define parseYMLO(self, input) (self)->f->parseYML(self, input)
-#define parseYMLG(self, input)
+bool cropElemBoolSmallDict (smallDictt *self, char* key);
+bool cropElemBoolSmallDictG (smallDictt *self, char* key);
/*
- * parse a yml string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseYMLSmallJson (smallJsont *self, char *input);
+double cropElemDoubleSmallDict (smallDictt *self, char* key);
+double cropElemDoubleSmallDictG (smallDictt *self, char* key);
/*
- * parse a yml string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseYMLSmallJsonG (smallJsont *self, char *input);
+int64_t cropElemIntSmallDict (smallDictt *self, char* key);
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key);
/*
- * parse a yml string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseYMLSmallJson (smallJsont *self, char *input);
-/*
- * parse a yml string
- */
-bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseYMLSmallJsonG (smallJsont *self, char *input);
+int32_t cropElemInt32SmallDict (smallDictt *self, char* key);
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key);
/*
- * parse a yml string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
-bool parseYMLSmallJsonSmallJsonG (smallJsont *self, smallJsont *input);
+uint64_t cropElemUintSmallDict (smallDictt *self, char* key);
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key);
/*
- * parse a yml string
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool parseYMLSmallStringSmallJson(smallJsont *self, smallStringt *input);
-bool parseYMLSmallStringSmallJsonG(smallJsont *self, smallStringt *input);
-//TODO stringifySmallJson rtChar rtSmallStringt
-//TODO toYMLSmallJson rtChar rtSmallStringt
-#define execG(cmd, out, err)
-#define renameG(src, dst)
-#define moveG(src, dst)
+uint32_t cropElemUint32SmallDict (smallDictt *self, char* key);
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key);
/*
- * log array or dictionary, one line per element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-#define logO(self) (self)->f->log(self)
-#define logG(self)
+char* cropElemSSmallDict (smallDictt *self, char* key);
+char* cropElemSSmallDictG (smallDictt *self, char* key);
/*
- * print list elements, one line per element
- * to stdout
- *
- * when list is NULL, returns directly without doing anything
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * nothing
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void logSmallArray (smallArrayt *self);
-void logSmallArrayG(smallArrayt *self);
+smallDictt* cropElemDictSmallDict (smallDictt *self, char* key);
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key);
/*
- * print dictionary content to stdout
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void logSmallDict (smallDictt *self);
-void logSmallDictG(smallDictt *self);
+smallArrayt* cropElemArraySmallDict (smallDictt *self, char* key);
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key);
/*
- * print json content to stdout
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void logSmallJson (smallJsont *self);
-void logSmallJsonG(smallJsont *self);
+smallBoolt* cropElemSmallBoolSmallDict (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key);
/*
- * log variable and its value
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Example:
- * logVarG(k)
- * k=14
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-#define logVarG(var)\
-#define logMVarG(mask, var)\
+smallBytest* cropElemSmallBytesSmallDict (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key);
/*
- * cat for smallArray and smallString
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-#define catO(self, ...) (self)->f->cat((self), __VA_ARGS__, NULL)
-#define catG catO
+smallDoublet* cropElemSmallDoubleSmallDict (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key);
/*
- * cat arrays
- *
- * append all arrays in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of arrays seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* catSmallArray (smallArrayt *self, ...);
+smallIntt* cropElemSmallIntSmallDict (smallDictt *self, char* key);
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key);
/*
- * cat arrays
- *
- * append all arrays in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of arrays seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* catSmallArray (smallArrayt *self, ...);
+smallJsont* cropElemSmallJsonSmallDict (smallDictt *self, char* key);
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key);
/*
- * cat json arrays
- *
- * append all arrays in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallArrays seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* catSmallJson (smallJsont *self, ...);
+smallStringt* cropElemSmallStringSmallDict (smallDictt *self, char* key);
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key);
/*
- * cat json arrays
- *
- * append all arrays in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallArrays seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* catSmallJson (smallJsont *self, ...);
+void* cropElemVoidSmallDict (smallDictt *self, char* key);
+void* cropElemVoidSmallDictG (smallDictt *self, char* key);
/*
- * cat string
- *
- * append all strings in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of strings seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* catSmallString (smallStringt *self, ...);
-#define catSO(self, ...) (self)->f->catSt((self), __VA_ARGS__, NULL)
-#define catSG catSO
+smallContainert* cropElemSmallContainerSmallDict (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key);
/*
- * cat string
- *
- * append all strings in the list to self
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of strings seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* catSSmallString (smallStringt *self, ...);
-#define pushManyO(self, ...) (self)->f->pushMany(self, __VA_ARGS__, NULL)
-#define pushManyG pushManyO
+baset* cropElemSmallDict (smallDictt *self, char* key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
/*
- * push many elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushManySmallArray (smallArrayt *self, ...);
+baset* cropElemSmallDict (smallDictt *self, char* key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
/*
- * push many elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushManySmallArray (smallArrayt *self, ...);
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * push many elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushManySmallJson (smallJsont *self, ...);
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
/*
- * push many elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushManySmallJson (smallJsont *self, ...);
-#define pushManySO(self, ...) (self)->f->pushManyS(self, __VA_ARGS__, NULL)
-#define pushManySG pushManySO
+undefinedt* cropElemKeyUndefinedSmallJson (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushManySSmallArray (smallArrayt *self, ...);
+bool cropElemKeyBoolSmallJson (smallJsont *self, char* key);
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushManySSmallArray (smallArrayt *self, ...);
+double cropElemKeyDoubleSmallJson (smallJsont *self, char* key);
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushManySSmallJson (smallJsont *self, ...);
+int64_t cropElemKeyIntSmallJson (smallJsont *self, char* key);
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushManySSmallJson (smallJsont *self, ...);
-#define pushNFreeManyO(self, ...) (self)->f->pushNFreeMany(self, __VA_ARGS__, NULL)
-#define pushNFreeManyG pushNFreeManyO
+int32_t cropElemKeyInt32SmallJson (smallJsont *self, char* key);
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key);
/*
- * push many elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushNFreeManySmallArray (smallArrayt *self, ...);
+uint64_t cropElemKeyUintSmallJson (smallJsont *self, char* key);
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key);
/*
- * push many elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushNFreeManySmallArray (smallArrayt *self, ...);
+uint32_t cropElemKeyUint32SmallJson (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key);
/*
- * push many elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushNFreeManySmallJson (smallJsont *self, ...);
+char* cropElemKeySSmallJson (smallJsont *self, char* key);
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key);
/*
- * push many elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallObject elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushNFreeManySmallJson (smallJsont *self, ...);
+smallDictt* cropElemKeyDictSmallJson (smallJsont *self, char* key);
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key);
/*
- * push many strings and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallStringt or char* strings seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* pushNFreeManySmallString (smallStringt *self, ...);
-#define pushNFreeManySO(self, ...) (self)->f->pushNFreeManyS(self, __VA_ARGS__, NULL)
-#define pushNFreeManySG pushNFreeManySO
+smallArrayt* cropElemKeyArraySmallJson (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushNFreeManySSmallArray(smallArrayt *self, ...);
+smallBoolt* cropElemKeySmallBoolSmallJson (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* pushNFreeManySSmallArray(smallArrayt *self, ...);
+smallBytest* cropElemKeySmallBytesSmallJson (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushNFreeManySSmallJson(smallJsont *self, ...);
+smallDoublet* cropElemKeySmallDoubleSmallJson (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key);
/*
- * push many string elements and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of char* string elements seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* pushNFreeManySSmallJson(smallJsont *self, ...);
+smallIntt* cropElemKeySmallIntSmallJson (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key);
/*
- * push many strings and free
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * arbitrary list of smallStringt or char* strings seperated by commas
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* pushNFreeManySSmallString(smallStringt *self, ...);
-// smallBytes pushBuffer
-#define pushBufferO(self, data, size) (self)->f->pushBuffer(self, data, size)
-#define pushBufferG pushBufferO
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key);
/*
- * push data buffer to object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * bytes small bytes
- * data buffer to push
- * size size of buffer
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallBytest* pushBufferSmallBytes (smallBytest *self, void *data, uint32_t size);
-#define disposeO(self) (self)->f->dispose(self)
-#define disposeG disposeO
+smallStringt* cropElemKeySmallStringSmallJson (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key);
/*
- * free index but not the elements
- * self becomes empty.
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Useful when the objects are shared
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void disposeSmallArray (smallArrayt *self);
+void* cropElemKeyVoidSmallJson (smallJsont *self, char* key);
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key);
/*
- * free index but not the elements
- * self becomes empty.
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Useful when the objects are shared
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void disposeSmallArray (smallArrayt *self);
+smallContainert* cropElemKeySmallContainerSmallJson (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key);
/*
- * free index but not the elements
- * self becomes empty.
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Useful when the objects are shared
- */
-void disposeSmallDict (smallDictt *self);
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
+ */
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * free index but not the elements
- * self becomes empty.
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Useful when the objects are shared
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void disposeSmallJson (smallJsont *self);
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
/*
- * free index but not the elements
- * self becomes empty.
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * Useful when the objects are shared
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void disposeSmallJson (smallJsont *self);
-#define helpO(self) (self)->f->help(self)
-#define helpG helpO
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallArray (smallArrayt *self);
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallArray (smallArrayt *self);
+undefinedt* cropElemKeyUndefinedSmallJson (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallBool (smallBoolt *self);
+bool cropElemKeyBoolSmallJson (smallJsont *self, char* key);
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallBytes (smallBytest *self);
+double cropElemKeyDoubleSmallJson (smallJsont *self, char* key);
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallContainer (smallContainert *self);
+int64_t cropElemKeyIntSmallJson (smallJsont *self, char* key);
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallDict (smallDictt *self);
+int32_t cropElemKeyInt32SmallJson (smallJsont *self, char* key);
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallDouble (smallDoublet *self);
+uint64_t cropElemKeyUintSmallJson (smallJsont *self, char* key);
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallInt (smallIntt *self);
+uint32_t cropElemKeyUint32SmallJson (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallJson (smallJsont *self);
+char* cropElemKeySSmallJson (smallJsont *self, char* key);
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallJson (smallJsont *self);
+smallDictt* cropElemKeyDictSmallJson (smallJsont *self, char* key);
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key);
/*
- * free container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* helpSmallString (smallStringt *self);
-#define resetO(self) (self)->f->reset(self)
-#define resetG resetO
+smallArrayt* cropElemKeyArraySmallJson (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key);
/*
- * remove reference to internal sObject, set NULL and
- * free the iterator
- *
- * this function is useful for object not allocated on the heap
- * to free the iterator element when the object is not used anymore
- *
- * for example:
- * createSmallArray(array);
- * iter(array, e) {
- * ...
- * break;
- * }
- * resetG(array); // free iteraror element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void resetSmallArray (smallArrayt *self);
+smallBoolt* cropElemKeySmallBoolSmallJson (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key);
/*
- * remove reference to internal sObject, set NULL and
- * free the iterator
- *
- * this function is useful for object not allocated on the heap
- * to free the iterator element when the object is not used anymore
- *
- * for example:
- * createSmallArray(array);
- * iter(array, e) {
- * ...
- * break;
- * }
- * resetG(array); // free iteraror element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void resetSmallArray (smallArrayt *self);
+smallBytest* cropElemKeySmallBytesSmallJson (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key);
/*
- * remove reference to internal sObject, set NULL and
- * free the iterator
- *
- * this function is useful for object not allocated on the heap
- * to free the iterator element when the object is not used anymore
- *
- * for example:
- * createSmallDict(d);
- * iter(d, e) {
- * ...
- * break;
- * }
- * resetG(d); // free iteraror element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void resetSmallDict (smallDictt *self);
+smallDoublet* cropElemKeySmallDoubleSmallJson (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key);
/*
- * remove reference to internal sObject, set NULL and
- * free the iterator
- *
- * this function is useful for object not allocated on the heap
- * to free the iterator element when the object is not used anymore
- *
- * for example:
- * createSmallJson(j);
- * iter(j, e) {
- * ...
- * break;
- * }
- * resetG(j); // free iteraror element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void resetSmallJson (smallJsont *self);
+smallIntt* cropElemKeySmallIntSmallJson (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key);
/*
- * remove reference to internal sObject, set NULL and
- * free the iterator
- *
- * this function is useful for object not allocated on the heap
- * to free the iterator element when the object is not used anymore
- *
- * for example:
- * createSmallJson(j);
- * iter(j, e) {
- * ...
- * break;
- * }
- * resetG(j); // free iteraror element
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void resetSmallJson (smallJsont *self);
-#define getsoO(self) (self)->f->getso(self)
-#define getsoG getsoO
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key);
/*
- * get the sobject, data in the container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-sArrayt* getsoSmallArray (smallArrayt *self);
+smallStringt* cropElemKeySmallStringSmallJson (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key);
/*
- * get the sobject, data in the container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-sArrayt* getsoSmallArray (smallArrayt *self);
+void* cropElemKeyVoidSmallJson (smallJsont *self, char* key);
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key);
/*
- * get the sobject, data in the container
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-sDictt* getsoSmallDict (smallDictt *self);
+smallContainert* cropElemKeySmallContainerSmallJson (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key);
/*
- * get the sobject, data in the container only when the type is dict or array
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallt* getsoSmallJson (smallJsont *self);
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * get the sobject, data in the container only when the type is dict or array
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallt* getsoSmallJson (smallJsont *self);
-#define setsoO(self, so) (self)->f->setso(self, so)
-#define setsoG setsoO
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
/*
- * set the sobject, data in the container
- * the iterator is reset
- */
-void setsoSmallArray (smallArrayt *self, sArrayt *so);
-/*
- * set the sobject, data in the container
- * the iterator is reset
- */
-void setsoSmallArray (smallArrayt *self, sArrayt *so);
-/*
- * set the sobject, data in the container
- * the iterator is reset
- */
-void setsoSmallDict (smallDictt *self, sDictt *so);
-/*
- * set the sobject, data in the container only when the type is dict or array
- * the iterator is reset
- */
-void setsoSmallJson (smallJsont *self, smallt *so);
-/*
- * set the sobject, data in the container only when the type is dict or array
- * the iterator is reset
- */
-void setsoSmallJson (smallJsont *self, smallt *so);
-#define mirrorO(self) (self)->f->mirror(self)
-#define mirrorG mirrorO
-/*
- * allocate a new container for the sobject, the iterator state is copied
- * after this function is executed, there are 2 containers for one sobject,
- * only one container should be freed or terminated, the other one should be finished
- */
-smallArrayt* mirrorSmallArray (smallArrayt *self);
-/*
- * allocate a new container for the sobject, the iterator state is copied
- * after this function is executed, there are 2 containers for one sobject,
- * only one container should be freed or terminated, the other one should be finished
- */
-smallArrayt* mirrorSmallArray (smallArrayt *self);
-/*
- * allocate a new container for the sobject, the iterator state is copied
- * after this function is executed, there are 2 containers for one sobject,
- * only one container should be freed or terminated, the other one should be finished
- */
-smallDictt* mirrorSmallDict (smallDictt *self);
-/*
- * allocate a new container for the sobject, the iterator state is copied. Only for type array or dict
- * after this function is executed, there are 2 containers for one sobject,
- * only one container should be freed or terminated, the other one should be finished
- */
-smallJsont* mirrorSmallJson (smallJsont *self);
-/*
- * allocate a new container for the sobject, the iterator state is copied. Only for type array or dict
- * after this function is executed, there are 2 containers for one sobject,
- * only one container should be freed or terminated, the other one should be finished
- */
-smallJsont* mirrorSmallJson (smallJsont *self);
-#define fromArrayNFreeO(self, array, size) (self)->f->fromArrayNFree(self, array, size)
-#define fromArrayNFreeG fromArrayNFreeO
-/*
- * copy array of 'size' to self
- * NULL elements are not copied to the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
- * \param
- * size number of elements in the array, size 0 means NULL terminated array
+ * index must be in the list
* \return
- * list
- * empty list when size is 0
- * NULL when array is NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* fromArrayNFreeSmallArray(smallArrayt *self, char **array, size_t size);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * copy array of 'size' to self
- * NULL elements are not copied to the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
- * \param
- * size number of elements in the array, size 0 means NULL terminated array
+ * index must be in the list
* \return
- * list
- * empty list when size is 0
- * NULL when array is NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* fromArrayNFreeSmallArray(smallArrayt *self, char **array, size_t size);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * copy array of 'size' to self
- * NULL elements are not copied to the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
- * \param
- * size number of elements in the array, size 0 means NULL terminated array
+ * index must be in the list
* \return
- * list
- * empty list when size is 0
- * NULL when array is NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* fromArrayNFreeSmallJson(smallJsont *self, char **array, size_t size);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * copy array of 'size' to self
- * NULL elements are not copied to the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
- * \param
- * size number of elements in the array, size 0 means NULL terminated array
+ * index must be in the list
* \return
- * list
- * empty list when size is 0
- * NULL when array is NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* fromArrayNFreeSmallJson(smallJsont *self, char **array, size_t size);
-#define pushCharO(self, c) (self)->f->pushChar(self, c)
-#define pushCharG pushCharO
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push the sObject pointer to array
- * append value at the end of the list
- * when s is NULL, NULL is pushed at the end of the list
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value: object to push
+ * index must be in the list
* \return
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push the sObject pointer to array
- * append value at the end of the list
- * when s is NULL, NULL is pushed at the end of the list
- *
-//:define pushHelp
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
-//:end
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value: object to push
+ * index must be in the list
* \return
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push value to json
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushCharSmallJson (smallJsont *self, char c);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * push value to json
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushCharSmallJson (smallJsont *self, char c);
-#define pushArraycO(self, array) (self)->f->pushArrayc(self, array)
-#define pushArraycG pushArraycO
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push the sObject pointer to array
- * append value at the end of the list
- * when s is NULL, NULL is pushed at the end of the list
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value: object to push
+ * index must be in the list
* \return
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushArraycSmallArray (smallArrayt *self, char **array);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * push the sObject pointer to array
- * append value at the end of the list
- * when s is NULL, NULL is pushed at the end of the list
- *
-//:define pushHelp
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
-//:end
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value: object to push
+ * index must be in the list
* \return
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushArraycSmallArray (smallArrayt *self, char **array);
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push value to json
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushArraycSmallJson (smallJsont *self, char **array);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push value to json
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushArraycSmallJson (smallJsont *self, char **array);
-#define pushNFreeArraycO(self, array) (self)->f->pushNFreeArrayc(self, array)
-#define pushNFreeArraycG pushNFreeArraycO
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushNFreeArraycSmallArray (smallArrayt *self, char **array);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushNFreeArraycSmallArray (smallArrayt *self, char **array);
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushNFreeArraycSmallJson (smallJsont *self, char **array);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushNFreeArraycSmallJson (smallJsont *self, char **array);
-#define pushNFreeSmallBytesO(self, value) (self)->f->pushNFreeSmallBytes(self, value)
-#define pushNFreeSmallBytesG pushNFreeSmallBytesO
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* pushNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * push element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value an object
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* pushNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define popSmallBytesO(self) (self)->f->popSmallBytes(self)
-#define popSmallBytesG popSmallBytesO
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop object
- * return last object from list and remove last element from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * last object pointer
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* popSmallBytesSmallArray (smallArrayt *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * pop object
- * return last object from list and remove last element from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * last object pointer
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* popSmallBytesSmallArray (smallArrayt *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop object
- * return last object from list and remove last element from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * last object pointer
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* popSmallBytesSmallJson (smallJsont *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * pop object
- * return last object from list and remove last element from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * last object pointer
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* popSmallBytesSmallJson (smallJsont *self);
-#define popNumO(self) (self)->f->popNum(self)
-#define popNumG popNumO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double popNumSmallArray (smallArrayt *self);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double popNumSmallArray (smallArrayt *self);
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double popNumSmallJson (smallJsont *self);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * pop number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double popNumSmallJson (smallJsont *self);
-#define prependUndefinedO(self) (self)->f->prependUndefined(self)
-#define prependUndefinedG prependUndefinedO
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependUndefinedSmallArray (smallArrayt *self);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependUndefinedSmallArray (smallArrayt *self);
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependUndefinedSmallJson (smallJsont *self);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependUndefinedSmallJson (smallJsont *self);
-#define prependBoolO(self, value) (self)->f->prependBool(self, value)
-#define prependBoolG prependBoolO
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependBoolSmallArray (smallArrayt *self, bool value);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependBoolSmallArray (smallArrayt *self, bool value);
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependBoolSmallJson (smallJsont *self, bool value);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependBoolSmallJson (smallJsont *self, bool value);
-#define prependDoubleO(self, value) (self)->f->prependDouble(self, value)
-#define prependDoubleG prependDoubleO
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependDoubleSmallArray (smallArrayt *self, double value);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependDoubleSmallArray (smallArrayt *self, double value);
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependDoubleSmallJson (smallJsont *self, double value);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependDoubleSmallJson (smallJsont *self, double value);
-#define prependIntO(self, value) (self)->f->prependInt(self, value)
-#define prependIntG prependIntO
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependIntSmallArray (smallArrayt *self, int64_t value);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependIntSmallArray (smallArrayt *self, int64_t value);
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependIntSmallJson (smallJsont *self, int64_t value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependIntSmallJson (smallJsont *self, int64_t value);
-#define prependSO(self, string) (self)->f->prependS(self, string)
-#define prependSG prependSO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSSmallArray (smallArrayt *self, const char *string);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSSmallArray (smallArrayt *self, const char *string);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSSmallJson (smallJsont *self, const char *string);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSSmallJson (smallJsont *self, const char *string);
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend string
- * append string at the beginning of the list
- * when string is NULL, the operation is canceled
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * string: string to prepend
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallStringt* prependSSmallString (smallStringt *self, char *string);
-#define prependCharO(self, c) (self)->f->prependChar(self, c)
-#define prependCharG prependCharO
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependCharSmallArray (smallArrayt *self, char c);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependCharSmallArray (smallArrayt *self, char c);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependCharSmallJson (smallJsont *self, char c);
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependCharSmallJson (smallJsont *self, char c);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend string
- * append string at the beginning of the list
- * when string is NULL, the operation is canceled
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * string: string to prepend
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallStringt* prependCharSmallString (smallStringt *self, char c);
-#define prependDictO(self, dict) (self)->f->prependDict(self, dict)
-#define prependDictG prependDictO
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependDictSmallJson (smallJsont *self, smallDictt *dict);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependDictSmallJson (smallJsont *self, smallDictt *dict);
-#define prependArrayO(self, array) (self)->f->prependArray(self, array)
-#define prependArrayG prependArrayO
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependArraySmallJson (smallJsont *self, smallArrayt *array);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependArraySmallJson (smallJsont *self, smallArrayt *array);
-#define prependArraycO(self, array) (self)->f->prependArrayc(self, array)
-#define prependArraycG prependArraycO
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependArraycSmallArray (smallArrayt *self, char **array);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependArraycSmallArray (smallArrayt *self, char **array);
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependArraycSmallJson (smallJsont *self, char **array);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependArraycSmallJson (smallJsont *self, char **array);
-#define prependSmallBoolO(self, value) (self)->f->prependSmallBool(self, value)
-#define prependSmallBoolG prependSmallBoolO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define prependSmallBytesO(self, value) (self)->f->prependSmallBytes(self, value)
-#define prependSmallBytesG prependSmallBytesO
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define prependSmallDoubleO(self, value) (self)->f->prependSmallDouble(self, value)
-#define prependSmallDoubleG prependSmallDoubleO
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define prependSmallIntO(self, value) (self)->f->prependSmallInt(self, value)
-#define prependSmallIntG prependSmallIntO
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallIntSmallJson (smallJsont *self, smallIntt *value);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define prependSmallContainerO(self, container) (self)->f->prependSmallContainer(self, container)
-#define prependSmallContainerG prependSmallContainerO
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallContainerSmallArray (smallArrayt *self, smallContainert *container);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependSmallContainerSmallArray (smallArrayt *self, smallContainert *container);
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallContainerSmallJson (smallJsont *self, smallContainert *container);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependSmallContainerSmallJson (smallJsont *self, smallContainert *container);
-#define prependNFreeUndefinedO(self, undefined) (self)->f->prependNFreeUndefined(self, undefined)
-#define prependNFreeUndefinedG prependNFreeUndefinedO
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeUndefinedSmallArray (smallArrayt *self, undefinedt *undefined);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeUndefinedSmallArray (smallArrayt *self, undefinedt *undefined);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeUndefinedSmallJson (smallJsont *self, undefinedt *undefined);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeUndefinedSmallJson (smallJsont *self, undefinedt *undefined);
-#define prependNFreeSO(self, string) (self)->f->prependNFreeS(self, string)
-#define prependNFreeSG prependNFreeSO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSSmallArray (smallArrayt *self, char *string);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSSmallArray (smallArrayt *self, char *string);
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSSmallJson (smallJsont *self, char *string);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSSmallJson (smallJsont *self, char *string);
-#define prependNFreeDictO(self, dict) (self)->f->prependNFreeDict(self, dict)
-#define prependNFreeDictG prependNFreeDictO
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeDictSmallArray (smallArrayt *self, smallDictt *dict);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeDictSmallArray (smallArrayt *self, smallDictt *dict);
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeDictSmallJson (smallJsont *self, smallDictt *dict);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeDictSmallJson (smallJsont *self, smallDictt *dict);
-#define prependNFreeArrayO(self, array) (self)->f->prependNFreeArray(self, array)
-#define prependNFreeArrayG prependNFreeArrayO
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeArraySmallJson (smallJsont *self, smallArrayt *array);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeArraySmallJson (smallJsont *self, smallArrayt *array);
-#define prependNFreeArraycO(self, array) (self)->f->prependNFreeArrayc(self, array)
-#define prependNFreeArraycG prependNFreeArraycO
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeArraycSmallArray (smallArrayt *self, char **array);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeArraycSmallArray (smallArrayt *self, char **array);
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeArraycSmallJson (smallJsont *self, char **array);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeArraycSmallJson (smallJsont *self, char **array);
-#define prependNFreeSmallBoolO(self, value) (self)->f->prependNFreeSmallBool(self, value)
-#define prependNFreeSmallBoolG prependNFreeSmallBoolO
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define prependNFreeSmallBytesO(self, value) (self)->f->prependNFreeSmallBytes(self, value)
-#define prependNFreeSmallBytesG prependNFreeSmallBytesO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define prependNFreeSmallDoubleO(self, value) (self)->f->prependNFreeSmallDouble(self, value)
-#define prependNFreeSmallDoubleG prependNFreeSmallDoubleO
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define prependNFreeSmallIntO(self, value) (self)->f->prependNFreeSmallInt(self, value)
-#define prependNFreeSmallIntG prependNFreeSmallIntO
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define prependNFreeSmallStringO(self, string) (self)->f->prependNFreeSmallString(self, string)
-#define prependNFreeSmallStringG prependNFreeSmallStringO
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallStringSmallJson (smallJsont *self, smallStringt *string);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallStringSmallJson (smallJsont *self, smallStringt *string);
-#define prependNFreeSmallContainerO(self, container) (self)->f->prependNFreeSmallContainer(self, container)
-#define prependNFreeSmallContainerG prependNFreeSmallContainerO
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* prependNFreeSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallContainerSmallJson(smallJsont *self, smallContainert *container);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * prepend object
- * append object pointer at the beginning of the list
- * when value is NULL, the operation is canceled
- *
-//:pushHelp
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value string to prepend
+ * index must be in the list
* \return
- * self
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* prependNFreeSmallContainerSmallJson(smallJsont *self, smallContainert *container);
-#define dequeueUndefinedO(self) (self)->f->dequeueUndefined(self)
-#define dequeueUndefinedG dequeueUndefinedO
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* dequeueUndefinedSmallArray (smallArrayt *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* dequeueUndefinedSmallArray (smallArrayt *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* dequeueUndefinedSmallJson (smallJsont *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* dequeueUndefinedSmallJson (smallJsont *self);
-#define dequeueBoolO(self) (self)->f->dequeueBool(self)
-#define dequeueBoolG dequeueBoolO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool dequeueBoolSmallArray (smallArrayt *self);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool dequeueBoolSmallArray (smallArrayt *self);
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool dequeueBoolSmallJson (smallJsont *self);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool dequeueBoolSmallJson (smallJsont *self);
-#define dequeueDoubleO(self) (self)->f->dequeueDouble(self)
-#define dequeueDoubleG dequeueDoubleO
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueDoubleSmallArray (smallArrayt *self);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueDoubleSmallArray (smallArrayt *self);
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueDoubleSmallJson (smallJsont *self);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueDoubleSmallJson (smallJsont *self);
-#define dequeueIntO(self) (self)->f->dequeueInt(self)
-#define dequeueIntG dequeueIntO
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t dequeueIntSmallArray (smallArrayt *self);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t dequeueIntSmallArray (smallArrayt *self);
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t dequeueIntSmallJson (smallJsont *self);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t dequeueIntSmallJson (smallJsont *self);
-#define dequeueInt32O(self) (self)->f->dequeueInt32(self)
-#define dequeueInt32G dequeueInt32O
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t dequeueInt32SmallArray (smallArrayt *self);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t dequeueInt32SmallArray (smallArrayt *self);
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t dequeueInt32SmallJson (smallJsont *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t dequeueInt32SmallJson (smallJsont *self);
-#define dequeueUintO(self) (self)->f->dequeueUint(self)
-#define dequeueUintG dequeueUintO
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t dequeueUintSmallArray (smallArrayt *self);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t dequeueUintSmallArray (smallArrayt *self);
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t dequeueUintSmallJson (smallJsont *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t dequeueUintSmallJson (smallJsont *self);
-#define dequeueUint32O(self) (self)->f->dequeueUint32(self)
-#define dequeueUint32G dequeueUint32O
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint32_t dequeueUint32SmallArray (smallArrayt *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint32_t dequeueUint32SmallArray (smallArrayt *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint32_t dequeueUint32SmallJson (smallJsont *self);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint32_t dequeueUint32SmallJson (smallJsont *self);
-#define dequeueSO(self) (self)->f->dequeueS(self)
-#define dequeueSG dequeueSO
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-char* dequeueSSmallArray (smallArrayt *self);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-char* dequeueSSmallArray (smallArrayt *self);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-char* dequeueSSmallJson (smallJsont *self);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-char* dequeueSSmallJson (smallJsont *self);
-#define dequeueDictO(self) (self)->f->dequeueDict(self)
-#define dequeueDictG dequeueDictO
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallDictt* dequeueDictSmallArray (smallArrayt *self);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallDictt* dequeueDictSmallArray (smallArrayt *self);
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallDictt* dequeueDictSmallJson (smallJsont *self);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallDictt* dequeueDictSmallJson (smallJsont *self);
-#define dequeueArrayO(self) (self)->f->dequeueArray(self)
-#define dequeueArrayG dequeueArrayO
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* dequeueArraySmallArray (smallArrayt *self);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* dequeueArraySmallArray (smallArrayt *self);
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* dequeueArraySmallJson (smallJsont *self);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* dequeueArraySmallJson (smallJsont *self);
-#define dequeueSmallBoolO(self) (self)->f->dequeueSmallBool(self)
-#define dequeueSmallBoolG dequeueSmallBoolO
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBoolt* dequeueSmallBoolSmallArray (smallArrayt *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBoolt* dequeueSmallBoolSmallArray (smallArrayt *self);
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBoolt* dequeueSmallBoolSmallJson (smallJsont *self);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBoolt* dequeueSmallBoolSmallJson (smallJsont *self);
-#define dequeueSmallBytesO(self) (self)->f->dequeueSmallBytes(self)
-#define dequeueSmallBytesG dequeueSmallBytesO
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* dequeueSmallBytesSmallArray (smallArrayt *self);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallBytest* dequeueSmallBytesSmallArray (smallArrayt *self);
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallBytest* dequeueSmallBytesSmallJson (smallJsont *self);
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
+ * \param
+ * key must exist in the dictionary
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallBytest* dequeueSmallBytesSmallJson (smallJsont *self);
-#define dequeueSmallDoubleO(self) (self)->f->dequeueSmallDouble(self)
-#define dequeueSmallDoubleG dequeueSmallDoubleO
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallDoublet* dequeueSmallDoubleSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallDoublet* dequeueSmallDoubleSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallDoublet* dequeueSmallDoubleSmallJson (smallJsont *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallDoublet* dequeueSmallDoubleSmallJson (smallJsont *self);
-#define dequeueSmallIntO(self) (self)->f->dequeueSmallInt(self)
-#define dequeueSmallIntG dequeueSmallIntO
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallIntt* dequeueSmallIntSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallIntt* dequeueSmallIntSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallIntt* dequeueSmallIntSmallJson (smallJsont *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallIntt* dequeueSmallIntSmallJson (smallJsont *self);
-#define dequeueSmallStringO(self) (self)->f->dequeueSmallString(self)
-#define dequeueSmallStringG dequeueSmallStringO
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallStringt* dequeueSmallStringSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallStringt* dequeueSmallStringSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallStringt* dequeueSmallStringSmallJson (smallJsont *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-smallStringt* dequeueSmallStringSmallJson (smallJsont *self);
-#define dequeueVoidO(self) (self)->f->dequeueVoid(self)
-#define dequeueVoidG dequeueVoidO
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
- */
-void* dequeueVoidSmallArray (smallArrayt *self);
-/*
- * dequeue object
- * return first object from list and remove it from the list
- *
- * \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-void* dequeueVoidSmallArray (smallArrayt *self);
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-void* dequeueVoidSmallJson (smallJsont *self);
+baset* cropElemSmallArray (smallArrayt *self, intmax_t index);
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-void* dequeueVoidSmallJson (smallJsont *self);
-#define dequeueSmallContainerO(self) (self)->f->dequeueSmallContainer(self)
-#define dequeueSmallContainerG dequeueSmallContainerO
+undefinedt* cropElemUndefinedSmallArray (smallArrayt *self, intmax_t index);
+undefinedt* cropElemUndefinedSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallContainert* dequeueSmallContainerSmallArray(smallArrayt *self);
+bool cropElemBoolSmallArray (smallArrayt *self, intmax_t index);
+bool cropElemBoolSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallContainert* dequeueSmallContainerSmallArray(smallArrayt *self);
+double cropElemDoubleSmallArray (smallArrayt *self, intmax_t index);
+double cropElemDoubleSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallContainert* dequeueSmallContainerSmallJson(smallJsont *self);
+int64_t cropElemIntSmallArray (smallArrayt *self, intmax_t index);
+int64_t cropElemIntSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue object
- * return first object from list and remove it from the list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * first object
- * NULL when the list is NULL or empty (first element is NULL)
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallContainert* dequeueSmallContainerSmallJson(smallJsont *self);
-#define dequeueNumO(self) (self)->f->dequeueNum(self)
-#define dequeueNumG dequeueNumO
+int32_t cropElemInt32SmallArray (smallArrayt *self, intmax_t index);
+int32_t cropElemInt32SmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueNumSmallArray (smallArrayt *self);
+uint64_t cropElemUintSmallArray (smallArrayt *self, intmax_t index);
+uint64_t cropElemUintSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueNumSmallArray (smallArrayt *self);
+uint32_t cropElemUint32SmallArray (smallArrayt *self, intmax_t index);
+uint32_t cropElemUint32SmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueNumSmallJson (smallJsont *self);
+char* cropElemSSmallArray (smallArrayt *self, intmax_t index);
+char* cropElemSSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * dequeue number
- *
- * if the element is a double, its value is returned as is
- * if the element is an int, its value is converted to double
- * if the element is not a number, 0 is returned
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
+ * \param
+ * index must be in the list
* \return
- * double type number or 0
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double dequeueNumSmallJson (smallJsont *self);
-#define appendArrayO(self, array) (self)->f->appendArray(self, array)
-#define appendArrayG appendArrayO
+smallDictt* cropElemDictSmallArray (smallArrayt *self, intmax_t index);
+smallDictt* cropElemDictSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* appendArraySmallArray (smallArrayt *self, char **array);
+smallArrayt* cropElemArraySmallArray (smallArrayt *self, intmax_t index);
+smallArrayt* cropElemArraySmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* appendArraySmallArray (smallArrayt *self, char **array);
+smallBoolt* cropElemSmallBoolSmallArray (smallArrayt *self, intmax_t index);
+smallBoolt* cropElemSmallBoolSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* appendArraySmallJson (smallJsont *self, char **array);
+smallBytest* cropElemSmallBytesSmallArray (smallArrayt *self, intmax_t index);
+smallBytest* cropElemSmallBytesSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* appendArraySmallJson (smallJsont *self, char **array);
-#define appendNSmashArrayO(self, array) (self)->f->appendNSmashArray(self, array)
-#define appendNSmashArrayG appendNSmashArrayO
+smallDoublet* cropElemSmallDoubleSmallArray (smallArrayt *self, intmax_t index);
+smallDoublet* cropElemSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* appendNSmashArraySmallArray (smallArrayt *self, char **array);
+smallIntt* cropElemSmallIntSmallArray (smallArrayt *self, intmax_t index);
+smallIntt* cropElemSmallIntSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* appendNSmashArraySmallArray (smallArrayt *self, char **array);
+smallJsont* cropElemSmallJsonSmallArray (smallArrayt *self, intmax_t index);
+smallJsont* cropElemSmallJsonSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* appendNSmashArraySmallJson(smallJsont *self, char **array);
+smallStringt* cropElemSmallStringSmallArray (smallArrayt *self, intmax_t index);
+smallStringt* cropElemSmallStringSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * append array at the end of self by copying the pointers
- * from array to self.
- * After this function, free array with dispose/smash instead of free/terminate
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * array
+ * index must be in the list
* \return
- * self and array in self
- * self not modified when self and array are NULL
- * or when self is identical to array (same pointers)
- * 0 success
- * -1 error
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* appendNSmashArraySmallJson(smallJsont *self, char **array);
-#define injectUndefinedO(self, index) (self)->f->injectUndefined(self, index)
-#define injectUndefinedG injectUndefinedO
+void* cropElemVoidSmallArray (smallArrayt *self, intmax_t index);
+void* cropElemVoidSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
* negative indexes are allowed
*
* \param
- * index in array
- * \param
- * toInject element
+ * index must be in the list
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
* NULL error
*/
-smallArrayt* injectUndefinedSmallArray(smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainerSmallArray (smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainerSmallArrayG(smallArrayt *self, intmax_t index);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
* negative indexes are allowed
*
* \param
- * index in array
- * \param
- * toInject element
+ * index must be in the list
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
* NULL error
*/
-smallArrayt* injectUndefinedSmallArray(smallArrayt *self, intmax_t index);
+baset* cropElemSmallArray (smallArrayt *self, intmax_t index);
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * Crop a single character
+ * return character at index
+ * and delete character at index in the original string
* negative indexes are allowed
*
* \param
- * index in array
- * \param
- * toInject element
+ * index must be in the string
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * character at index
+ * unchanged when list is empty
+ * 0 error
*/
-smallJsont* injectUndefinedSmallJson(smallJsont *self, intmax_t index);
+char cropElemSmallString(smallStringt *self, intmax_t index);
+char cropElemSmallStringG (smallStringt *self, intmax_t index);
+#define cropSmallJsonO(self, start, end) (self)->f->cropSmallJson(self, start, end)
+#define cropElemAtSmallJsonO(self, index) (self)->f->cropElemAtSmallJson(self, index)
+#define cropElemKeySmallJsonO(self, key) (self)->f->cropElemKeySmallJson(self, key)
+#define cropSmallStringO(self, start, end) (self)->f->cropSmallString(self, start, end)
+#define cropElemSmallStringO(self, index) (self)->f->cropElemSmallString(self, index)
+#define copyRngO(self, start, end) (self)->f->copy(self, start, end)
+#define copyRngG(self, start, end)
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
* \param
- * index in array
+ * start index, must be in the list
* \param
- * toInject element
+ * end index, must be in the list
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * new sliced list
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
* NULL error
*/
-smallJsont* injectUndefinedSmallJson(smallJsont *self, intmax_t index);
-#define injectBoolO(self, index, toInject) (self)->f->injectBool(self, index, toInject)
-#define injectBoolG injectBoolO
+smallArrayt* copySmallArray (smallArrayt *self, intmax_t start, intmax_t end);
+smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
* \param
- * index in array
+ * start index, must be in the list
* \param
- * toInject element
+ * end index, must be in the list
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * new sliced list
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
* NULL error
*/
-smallArrayt* injectBoolSmallArray (smallArrayt *self, intmax_t index, bool toInject);
+smallJsont* copySmallJson (smallJsont *self, intmax_t start, intmax_t end);
+smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
+ * copy string between start and end
+ * self becomes the smallString between start and end
* negative indexes are allowed
*
* \param
- * index in array
+ * start: start index, must be in the smallString
* \param
- * toInject element
+ * end: end index, must be in the smallString after start
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * new sliced smallString
+ * "" when start=end
+ * NULL when start and end are not set correctly
*/
-smallArrayt* injectBoolSmallArray (smallArrayt *self, intmax_t index, bool toInject);
+smallStringt* copySmallString (smallStringt *self, intmax_t start, intmax_t end);
+smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end);
+#define insertO(self, index, toInsert) (self)->f->insert(self, index, toInsert)
+#define insertG(self, index, toInsert)
+#define insertNSmashO(self, index, toInsert) (self)->f->insertNSmash(self, index, toInsert)
+#define insertNFreeO insertNSmashO
+#define insertNFreeG insertNSmashG
/*
- * inject an element in self at index
+ * insert smallString in self at index
*
- * return array with toInject at index
+ * return smallString with toInsert at index
* negative indexes are allowed
+ * index -1 is the end of the array and is equivalent to index len
*
* \param
- * index in array
+ * index in smallString
* \param
- * toInject element
+ * toInsert smallString
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self smallString
+ * NULL unchanged smallString when smallString is NULL or invalid index
*/
-smallJsont* injectBoolSmallJson (smallJsont *self, intmax_t index, bool toInject);
+smallStringt* insertNFreeSmallString (smallStringt *self, intmax_t index, smallStringt *toInsert);
+#define insertNSmashG(self, index, toInsert)
+#define injectG(self, index, value)
+#define injectNFreeG(self, index, value)
+#define findO(self, needle) (self)->f->find(self, needle)
+#define findG(self, needle)
+#define hasO(self, key) (self)->f->has(self, key)
+#define hasG(self, needle)
+#define indexOfO(self, key) (self)->f->indexOf(self, key)
+#define indexOfG(self, needle)
+#define keyByO(self, value) (self)->f->keyBy(self, value)
+#define keyByG(self, needle)
+#define icFindO(self, needle) (self)->f->icFind(self, needle)
+#define icFindG(self, needle)
+#define icHasO(self, key) (self)->f->icHas(self, key)
+#define icHasG(self, needle)
+#define icIndexOfO(self, key) (self)->f->icIndexOf(self, key)
+#define icIndexOfG(self, needle)
+#define icKeyByO(self, value) (self)->f->icKeyBy(self, value)
+#define icKeyByG(self, needle)
+#define emptyO(self) (self)->f->empty(self)
+#define emptyG(self)
+#define isEmptyO(self) (self)->f->isEmpty(self)
+#define isEmptyG(self)
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when self is empty (len=0)
+ * false when len > 0
*/
-smallJsont* injectBoolSmallJson (smallJsont *self, intmax_t index, bool toInject);
-#define injectDoubleO(self, index, toInject) (self)->f->injectDouble(self, index, toInject)
-#define injectDoubleG injectDoubleO
+bool isEmptySmallArray (smallArrayt *self);
+bool isEmptySmallArrayG (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when self is empty (len=0)
+ * false when len > 0
*/
-smallArrayt* injectDoubleSmallArray (smallArrayt *self, intmax_t index, double toInject);
+bool isEmptySmallBytes(smallBytest *self);
+bool isEmptySmallBytesG(smallBytest *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when self is empty (len=0)
+ * false when len > 0
*/
-smallArrayt* injectDoubleSmallArray (smallArrayt *self, intmax_t index, double toInject);
+bool isEmptySmallDict (smallDictt *self);
+bool isEmptySmallDictG (smallDictt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when self is empty (len=0)
+ * false when len > 0
*/
-smallJsont* injectDoubleSmallJson (smallJsont *self, intmax_t index, double toInject);
+bool isEmptySmallJson (smallJsont *self);
+bool isEmptySmallJsonG (smallJsont *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * is Empty SmallString
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * false when there are characters in the smallString
+ * true when smallString is empty
+ * true when smallString is NULL
*/
-smallJsont* injectDoubleSmallJson (smallJsont *self, intmax_t index, double toInject);
-#define injectIntO(self, index, toInject) (self)->f->injectInt(self, index, toInject)
-#define injectIntG injectIntO
+bool isEmptySmallString (smallStringt *self);
+bool isEmptySmallStringG (smallStringt *self);
+#define isBlankO(self) (self)->f->isBlank(self)
+#define isBlankG(self)
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when all elements in self are blank
+ * false when there is non blank element
*/
-smallArrayt* injectIntSmallArray (smallArrayt *self, intmax_t index, int64_t toInject);
+bool isBlankSmallArray (smallArrayt *self);
+bool isBlankSmallArrayG (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when self is empty (len=0)
+ * false when len > 0
*/
-smallArrayt* injectIntSmallArray (smallArrayt *self, intmax_t index, int64_t toInject);
+bool isEmptySmallDict (smallDictt *self);
+bool isEmptySmallDictG (smallDictt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * true when all elements in self are blank
+ * false when there is non blank element
*/
-smallJsont* injectIntSmallJson (smallJsont *self, intmax_t index, int64_t toInject);
+bool isBlankSmallJson (smallJsont *self);
+bool isBlankSmallJsonG (smallJsont *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * is Blank SmallString
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * false when there are non white space characters in the smallString
+ * true when there are only white spaces in the smallString
+ * true when smallString is empty
+ * true when smallString is NULL
*/
-smallJsont* injectIntSmallJson (smallJsont *self, intmax_t index, int64_t toInject);
-#define injectSO(self, index, toInject) (self)->f->injectS(self, index, toInject)
-#define injectSG injectSO
+bool isBlankSmallString (smallStringt *self);
+bool isBlankSmallStringG (smallStringt *self);
+#define fromArrayO(self, array, size) (self)->f->fromArray(self, array, size)
+#define fromArrayG(self, array, size)
+#define splitO(self, delim) (self)->f->split(self, delim)
+#define splitG(self, delim)
+//TODO create splitS generic
+#define icSplitO(self, delim) (self)->f->icSplit(self, delim)
+#define icSplitG(self, delim)
+#define joinO(self, delim) (self)->f->join(self, delim)
+#define joinG(self, delim)
+#define joinSO(self, delim) (self)->f->join(self, delim)
+#define joinSG(self, delim)
+#define extractO(self, delim1, delim2) (self)->f->extract(self, delim1, delim2)
+#define extractG(self, delim1, delim2)
+#define icExtractO(self, delim1, delim2) (self)->f->icExtract(self, delim1, delim2)
+#define icExtractG(self, delim1, delim2)
+#define reverseO(self) (self)->f->reverse(self)
+#define reverseG(self)
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * reverse list, the last element is the first element of the list
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * reversed list
+ * nothing when list is NULL
+ * 0 success
+ * -1 error
*/
-smallArrayt* injectSSmallArray (smallArrayt *self, intmax_t index, const char *toInject);
+smallArrayt* reverseSmallArray (smallArrayt *self);
+smallArrayt* reverseSmallArrayG (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * reverse list, the last element is the first element of the list
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * reversed list
+ * nothing when list is NULL
+ * 0 success
+ * -1 error
*/
-smallArrayt* injectSSmallArray (smallArrayt *self, intmax_t index, const char *toInject);
+smallJsont* reverseSmallJson (smallJsont *self);
+smallJsont* reverseSmallJsonG (smallJsont *self);
+#define addO(self, array) (self)->f->add(self, array)
+#define addG(self, list)
+#define sortO(self) (self)->f->sort(self)
+#define sortG(self)
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * sort self in alphabetic order
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * sorted list
+ * empty list when list is empty
+ * unchanged list when list is NULL
+ * 0 success
+ * -1 error
*/
-smallJsont* injectSSmallJson (smallJsont *self, intmax_t index, const char *toInject);
+smallArrayt* sortSmallArray (smallArrayt *self);
+smallArrayt* sortSmallArrayG (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * sort self in alphabetic order
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * sorted list
+ * empty list when list is empty
+ * unchanged list when list is NULL
+ * 0 success
+ * -1 error
*/
-smallJsont* injectSSmallJson (smallJsont *self, intmax_t index, const char *toInject);
-#define injectCharO(self, index, c) (self)->f->injectChar(self, index, c)
-#define injectCharG injectCharO
+smallJsont* sortSmallJson (smallJsont *self);
+smallJsont* sortSmallJsonG (smallJsont *self);
+#define binarySearchO(self, value) (self)->f->binarySearch(self, value)
+#define binarySearchG(self, string)
+#define icSortO(self) (self)->f->icSort(self)
+#define icSortG(self)
+#define icBinarySearchO(self, value) (self)->f->icBinarySearch(self, value)
+#define icBinarySearchG(self, string)
+#define compactO(self) (self)->f->compact(self)
+#define compactG(self)
+#define parseO(self, input) (self)->f->parse(self, input)
+#define parseG(self, input)
/*
- * inject an element in self at index
+ * parse a smallJson string
+ */
+bool parseSmallJson (smallJsont *self, char *input);
+/*
+ * parse a smallJson string
+ */
+bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseSmallJsonG (smallJsont *self, char *input);
+/*
+ * parse a smallJson string
+ */
+bool parseSmallJson (smallJsont *self, char *input);
+/*
+ * parse a smallJson string
+ */
+bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseSmallJsonG (smallJsont *self, char *input);
+/*
+ * parse a smallJson string
+ */
+bool parseSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseSmallJsonSmallJsonG (smallJsont *self, smallJsont *input);
+/*
+ * parse a smallJson string
+ */
+bool parseSmallStringSmallJson(smallJsont *self, smallStringt *input);
+bool parseSmallStringSmallJsonG (smallJsont *self, smallStringt *input);
+#define parseYMLO(self, input) (self)->f->parseYML(self, input)
+#define parseYMLG(self, input)
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallJson (smallJsont *self, char *input);
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseYMLSmallJsonG (smallJsont *self, char *input);
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallJson (smallJsont *self, char *input);
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseYMLSmallJsonG (smallJsont *self, char *input);
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallJsonSmallJson (smallJsont *self, smallJsont *input);
+bool parseYMLSmallJsonSmallJsonG (smallJsont *self, smallJsont *input);
+/*
+ * parse a yml string
+ */
+bool parseYMLSmallStringSmallJson(smallJsont *self, smallStringt *input);
+bool parseYMLSmallStringSmallJsonG(smallJsont *self, smallStringt *input);
+//TODO stringifySmallJson rtChar rtSmallStringt
+//TODO toYMLSmallJson rtChar rtSmallStringt
+#define execG(cmd, out, err)
+#define renameG(src, dst)
+#define moveG(src, dst)
+/*
+ * log array or dictionary, one line per element
+ */
+#define logO(self) (self)->f->log(self)
+#define logG(self)
+/*
+ * print list elements, one line per element
+ * to stdout
*
- * return array with toInject at index
- * negative indexes are allowed
+ * when list is NULL, returns directly without doing anything
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * nothing
*/
-smallArrayt* injectCharSmallArray (smallArrayt *self, intmax_t index, char c);
+void logSmallArray (smallArrayt *self);
+void logSmallArrayG(smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * print dictionary content to stdout
+ */
+void logSmallDict (smallDictt *self);
+void logSmallDictG(smallDictt *self);
+/*
+ * print json content to stdout
+ */
+void logSmallJson (smallJsont *self);
+void logSmallJsonG(smallJsont *self);
+/*
+ * log variable and its value
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * Example:
+ * logVarG(k)
+ * k=14
*/
-smallArrayt* injectCharSmallArray (smallArrayt *self, intmax_t index, char c);
+#define logVarG(var)\
+#define logMVarG(mask, var)\
/*
- * inject an element in self at index
+ * cat for smallArray and smallString
+ */
+#define catO(self, ...) (self)->f->cat((self), __VA_ARGS__, NULL)
+#define catG catO
+/*
+ * cat arrays
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all arrays in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of arrays seperated by commas
*/
-smallJsont* injectCharSmallJson (smallJsont *self, intmax_t index, char c);
+smallArrayt* catSmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
+ * cat arrays
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all arrays in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of arrays seperated by commas
*/
-smallJsont* injectCharSmallJson (smallJsont *self, intmax_t index, char c);
-#define injectDictO(self, index, toInject) (self)->f->injectDict(self, index, toInject)
-#define injectDictG injectDictO
+smallArrayt* catSmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
+ * cat json arrays
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all arrays in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallArrays seperated by commas
*/
-smallArrayt* injectDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
+smallJsont* catSmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
+ * cat json arrays
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all arrays in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallArrays seperated by commas
*/
-smallArrayt* injectDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
+smallJsont* catSmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
+ * cat string
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all strings in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of strings seperated by commas
*/
-smallJsont* injectDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
+smallStringt* catSmallString (smallStringt *self, ...);
+#define catSO(self, ...) (self)->f->catSt((self), __VA_ARGS__, NULL)
+#define catSG catSO
/*
- * inject an element in self at index
+ * cat string
*
- * return array with toInject at index
- * negative indexes are allowed
+ * append all strings in the list to self
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of strings seperated by commas
*/
-smallJsont* injectDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
-#define injectArrayO(self, index, toInject) (self)->f->injectArray(self, index, toInject)
-#define injectArrayG injectArrayO
+smallStringt* catSSmallString (smallStringt *self, ...);
+#define pushManyO(self, ...) (self)->f->pushMany(self, __VA_ARGS__, NULL)
+#define pushManyG pushManyO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallArrayt* injectArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
+smallArrayt* pushManySmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallArrayt* injectArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
+smallArrayt* pushManySmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallJsont* injectArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
+smallJsont* pushManySmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallJsont* injectArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
-#define injectArraycO(self, index, toInject) (self)->f->injectArrayc(self, index, toInject)
-#define injectArraycG injectArraycO
+smallJsont* pushManySmallJson (smallJsont *self, ...);
+#define pushManySO(self, ...) (self)->f->pushManyS(self, __VA_ARGS__, NULL)
+#define pushManySG pushManySO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallArrayt* injectArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
+smallArrayt* pushManySSmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallArrayt* injectArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
+smallArrayt* pushManySSmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallJsont* injectArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
+smallJsont* pushManySSmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallJsont* injectArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
-#define injectSmallBoolO(self, index, toInject) (self)->f->injectSmallBool(self, index, toInject)
-#define injectSmallBoolG injectSmallBoolO
+smallJsont* pushManySSmallJson (smallJsont *self, ...);
+#define pushNFreeManyO(self, ...) (self)->f->pushNFreeMany(self, __VA_ARGS__, NULL)
+#define pushNFreeManyG pushNFreeManyO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallArrayt* injectSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
+smallArrayt* pushNFreeManySmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallArrayt* injectSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
+smallArrayt* pushNFreeManySmallArray (smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallJsont* injectSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
+smallJsont* pushNFreeManySmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallObject elements seperated by commas
*/
-smallJsont* injectSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
-#define injectSmallBytesO(self, index, toInject) (self)->f->injectSmallBytes(self, index, toInject)
-#define injectSmallBytesG injectSmallBytesO
+smallJsont* pushNFreeManySmallJson (smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many strings and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallStringt or char* strings seperated by commas
*/
-smallArrayt* injectSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
+smallStringt* pushNFreeManySmallString (smallStringt *self, ...);
+#define pushNFreeManySO(self, ...) (self)->f->pushNFreeManyS(self, __VA_ARGS__, NULL)
+#define pushNFreeManySG pushNFreeManySO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallArrayt* injectSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
+smallArrayt* pushNFreeManySSmallArray(smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallJsont* injectSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
+smallArrayt* pushNFreeManySSmallArray(smallArrayt *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallJsont* injectSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
-#define injectSmallDoubleO(self, index, toInject) (self)->f->injectSmallDouble(self, index, toInject)
-#define injectSmallDoubleG injectSmallDoubleO
+smallJsont* pushNFreeManySSmallJson(smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many string elements and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of char* string elements seperated by commas
*/
-smallArrayt* injectSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
+smallJsont* pushNFreeManySSmallJson(smallJsont *self, ...);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push many strings and free
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * arbitrary list of smallStringt or char* strings seperated by commas
*/
-smallArrayt* injectSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
+smallStringt* pushNFreeManySSmallString(smallStringt *self, ...);
+// smallBytes pushBuffer
+#define pushBufferO(self, data, size) (self)->f->pushBuffer(self, data, size)
+#define pushBufferG pushBufferO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * push data buffer to object
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * bytes small bytes
+ * data buffer to push
+ * size size of buffer
*/
-smallJsont* injectSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
+smallBytest* pushBufferSmallBytes (smallBytest *self, void *data, uint32_t size);
+#define disposeO(self) (self)->f->dispose(self)
+#define disposeG disposeO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * free index but not the elements
+ * self becomes empty.
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * Useful when the objects are shared
*/
-smallJsont* injectSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
-#define injectSmallIntO(self, index, toInject) (self)->f->injectSmallInt(self, index, toInject)
-#define injectSmallIntG injectSmallIntO
+void disposeSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * free index but not the elements
+ * self becomes empty.
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * Useful when the objects are shared
*/
-smallArrayt* injectSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
+void disposeSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * free index but not the elements
+ * self becomes empty.
*
- * return array with toInject at index
- * negative indexes are allowed
+ * Useful when the objects are shared
+ */
+void disposeSmallDict (smallDictt *self);
+/*
+ * free index but not the elements
+ * self becomes empty.
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * Useful when the objects are shared
*/
-smallArrayt* injectSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
+void disposeSmallJson (smallJsont *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * free index but not the elements
+ * self becomes empty.
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * Useful when the objects are shared
*/
-smallJsont* injectSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
+void disposeSmallJson (smallJsont *self);
+#define helpO(self) (self)->f->help(self)
+#define helpG helpO
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallJsont* injectSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
-#define injectSmallContainerO(self, index, toInject) (self)->f->injectSmallContainer(self, index, toInject)
-#define injectSmallContainerG injectSmallContainerO
+const char* helpSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
+const char* helpSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
+const char* helpSmallBool (smallBoolt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
+const char* helpSmallBytes (smallBytest *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
-#define injectNFreeUndefinedO(self, index, undefined) (self)->f->injectNFreeUndefined(self, index, undefined)
-#define injectNFreeUndefinedG injectNFreeUndefinedO
+const char* helpSmallContainer (smallContainert *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallArrayt* injectNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined);
+const char* helpSmallDict (smallDictt *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
- *
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * free container
*/
-smallArrayt* injectNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined);
+const char* helpSmallDouble (smallDoublet *self);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * free container
+ */
+const char* helpSmallInt (smallIntt *self);
+/*
+ * free container
+ */
+const char* helpSmallJson (smallJsont *self);
+/*
+ * free container
+ */
+const char* helpSmallJson (smallJsont *self);
+/*
+ * free container
+ */
+const char* helpSmallString (smallStringt *self);
+#define resetO(self) (self)->f->reset(self)
+#define resetG resetO
+/*
+ * remove reference to internal sObject, set NULL and
+ * free the iterator
+ *
+ * this function is useful for object not allocated on the heap
+ * to free the iterator element when the object is not used anymore
+ *
+ * for example:
+ * createSmallArray(array);
+ * iter(array, e) {
+ * ...
+ * break;
+ * }
+ * resetG(array); // free iteraror element
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallJsont* injectNFreeUndefinedSmallJson(smallJsont *self, intmax_t index, undefinedt *undefined);
+void resetSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * remove reference to internal sObject, set NULL and
+ * free the iterator
*
- * return array with toInject at index
- * negative indexes are allowed
+ * this function is useful for object not allocated on the heap
+ * to free the iterator element when the object is not used anymore
+ *
+ * for example:
+ * createSmallArray(array);
+ * iter(array, e) {
+ * ...
+ * break;
+ * }
+ * resetG(array); // free iteraror element
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallJsont* injectNFreeUndefinedSmallJson(smallJsont *self, intmax_t index, undefinedt *undefined);
-#define injectNFreeSO(self, index, toInject) (self)->f->injectNFreeS(self, index, toInject)
-#define injectNFreeSG injectNFreeSO
+void resetSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * remove reference to internal sObject, set NULL and
+ * free the iterator
*
- * return array with toInject at index
- * negative indexes are allowed
+ * this function is useful for object not allocated on the heap
+ * to free the iterator element when the object is not used anymore
+ *
+ * for example:
+ * createSmallDict(d);
+ * iter(d, e) {
+ * ...
+ * break;
+ * }
+ * resetG(d); // free iteraror element
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeSSmallArray (smallArrayt *self, intmax_t index, char *toInject);
+void resetSmallDict (smallDictt *self);
/*
- * inject an element in self at index
+ * remove reference to internal sObject, set NULL and
+ * free the iterator
*
- * return array with toInject at index
- * negative indexes are allowed
+ * this function is useful for object not allocated on the heap
+ * to free the iterator element when the object is not used anymore
+ *
+ * for example:
+ * createSmallJson(j);
+ * iter(j, e) {
+ * ...
+ * break;
+ * }
+ * resetG(j); // free iteraror element
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeSSmallArray (smallArrayt *self, intmax_t index, char *toInject);
+void resetSmallJson (smallJsont *self);
/*
- * inject an element in self at index
+ * remove reference to internal sObject, set NULL and
+ * free the iterator
*
- * return array with toInject at index
- * negative indexes are allowed
+ * this function is useful for object not allocated on the heap
+ * to free the iterator element when the object is not used anymore
+ *
+ * for example:
+ * createSmallJson(j);
+ * iter(j, e) {
+ * ...
+ * break;
+ * }
+ * resetG(j); // free iteraror element
+ *
+ */
+void resetSmallJson (smallJsont *self);
+#define getsoO(self) (self)->f->getso(self)
+#define getsoG getsoO
+/*
+ * get the sobject, data in the container
+ */
+sArrayt* getsoSmallArray (smallArrayt *self);
+/*
+ * get the sobject, data in the container
+ */
+sArrayt* getsoSmallArray (smallArrayt *self);
+/*
+ * get the sobject, data in the container
+ */
+sDictt* getsoSmallDict (smallDictt *self);
+/*
+ * get the sobject, data in the container only when the type is dict or array
+ */
+smallt* getsoSmallJson (smallJsont *self);
+/*
+ * get the sobject, data in the container only when the type is dict or array
+ */
+smallt* getsoSmallJson (smallJsont *self);
+#define setsoO(self, so) (self)->f->setso(self, so)
+#define setsoG setsoO
+/*
+ * set the sobject, data in the container
+ * the iterator is reset
+ */
+void setsoSmallArray (smallArrayt *self, sArrayt *so);
+/*
+ * set the sobject, data in the container
+ * the iterator is reset
+ */
+void setsoSmallArray (smallArrayt *self, sArrayt *so);
+/*
+ * set the sobject, data in the container
+ * the iterator is reset
+ */
+void setsoSmallDict (smallDictt *self, sDictt *so);
+/*
+ * set the sobject, data in the container only when the type is dict or array
+ * the iterator is reset
+ */
+void setsoSmallJson (smallJsont *self, smallt *so);
+/*
+ * set the sobject, data in the container only when the type is dict or array
+ * the iterator is reset
+ */
+void setsoSmallJson (smallJsont *self, smallt *so);
+#define mirrorO(self) (self)->f->mirror(self)
+#define mirrorG mirrorO
+/*
+ * allocate a new container for the sobject, the iterator state is copied
+ * after this function is executed, there are 2 containers for one sobject,
+ * only one container should be freed or terminated, the other one should be finished
+ */
+smallArrayt* mirrorSmallArray (smallArrayt *self);
+/*
+ * allocate a new container for the sobject, the iterator state is copied
+ * after this function is executed, there are 2 containers for one sobject,
+ * only one container should be freed or terminated, the other one should be finished
+ */
+smallArrayt* mirrorSmallArray (smallArrayt *self);
+/*
+ * allocate a new container for the sobject, the iterator state is copied
+ * after this function is executed, there are 2 containers for one sobject,
+ * only one container should be freed or terminated, the other one should be finished
+ */
+smallDictt* mirrorSmallDict (smallDictt *self);
+/*
+ * allocate a new container for the sobject, the iterator state is copied. Only for type array or dict
+ * after this function is executed, there are 2 containers for one sobject,
+ * only one container should be freed or terminated, the other one should be finished
+ */
+smallJsont* mirrorSmallJson (smallJsont *self);
+/*
+ * allocate a new container for the sobject, the iterator state is copied. Only for type array or dict
+ * after this function is executed, there are 2 containers for one sobject,
+ * only one container should be freed or terminated, the other one should be finished
+ */
+smallJsont* mirrorSmallJson (smallJsont *self);
+#define fromArrayNFreeO(self, array, size) (self)->f->fromArrayNFree(self, array, size)
+#define fromArrayNFreeG fromArrayNFreeO
+/*
+ * copy array of 'size' to self
+ * NULL elements are not copied to the list
*
* \param
- * index in array
+ * array
* \param
- * toInject element
+ * size number of elements in the array, size 0 means NULL terminated array
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * list
+ * empty list when size is 0
+ * NULL when array is NULL
*/
-smallJsont* injectNFreeSSmallJson (smallJsont *self, intmax_t index, char *toInject);
+smallArrayt* fromArrayNFreeSmallArray(smallArrayt *self, char **array, size_t size);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * copy array of 'size' to self
+ * NULL elements are not copied to the list
*
* \param
- * index in array
+ * array
* \param
- * toInject element
+ * size number of elements in the array, size 0 means NULL terminated array
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * list
+ * empty list when size is 0
+ * NULL when array is NULL
*/
-smallJsont* injectNFreeSSmallJson (smallJsont *self, intmax_t index, char *toInject);
-#define injectNFreeDictO(self, index, toInject) (self)->f->injectNFreeDict(self, index, toInject)
-#define injectNFreeDictG injectNFreeDictO
+smallArrayt* fromArrayNFreeSmallArray(smallArrayt *self, char **array, size_t size);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * copy array of 'size' to self
+ * NULL elements are not copied to the list
*
* \param
- * index in array
+ * array
* \param
- * toInject element
+ * size number of elements in the array, size 0 means NULL terminated array
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * list
+ * empty list when size is 0
+ * NULL when array is NULL
*/
-smallArrayt* injectNFreeDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
+smallJsont* fromArrayNFreeSmallJson(smallJsont *self, char **array, size_t size);
/*
- * inject an element in self at index
- *
- * return array with toInject at index
- * negative indexes are allowed
+ * copy array of 'size' to self
+ * NULL elements are not copied to the list
*
* \param
- * index in array
+ * array
* \param
- * toInject element
+ * size number of elements in the array, size 0 means NULL terminated array
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * list
+ * empty list when size is 0
+ * NULL when array is NULL
*/
-smallArrayt* injectNFreeDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
+smallJsont* fromArrayNFreeSmallJson(smallJsont *self, char **array, size_t size);
+#define pushCharO(self, c) (self)->f->pushChar(self, c)
+#define pushCharG pushCharO
/*
- * inject an element in self at index
+ * push the sObject pointer to array
+ * append value at the end of the list
+ * when s is NULL, NULL is pushed at the end of the list
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * index in array
- * \param
- * toInject element
+ * value: object to push
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * self success
* NULL error
*/
-smallJsont* injectNFreeDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
+smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
/*
- * inject an element in self at index
+ * push the sObject pointer to array
+ * append value at the end of the list
+ * when s is NULL, NULL is pushed at the end of the list
*
- * return array with toInject at index
- * negative indexes are allowed
+//:define pushHelp
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+//:end
*
* \param
- * index in array
- * \param
- * toInject element
+ * value: object to push
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * self success
* NULL error
*/
-smallJsont* injectNFreeDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
-#define injectNFreeArrayO(self, index, toInject) (self)->f->injectNFreeArray(self, index, toInject)
-#define injectNFreeArrayG injectNFreeArrayO
+smallArrayt* pushCharSmallArray (smallArrayt *self, char c);
/*
- * inject an element in self at index
+ * push value to json
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
+smallJsont* pushCharSmallJson (smallJsont *self, char c);
/*
- * inject an element in self at index
+ * push value to json
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
+smallJsont* pushCharSmallJson (smallJsont *self, char c);
+#define pushArraycO(self, array) (self)->f->pushArrayc(self, array)
+#define pushArraycG pushArraycO
/*
- * inject an element in self at index
+ * push the sObject pointer to array
+ * append value at the end of the list
+ * when s is NULL, NULL is pushed at the end of the list
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * index in array
- * \param
- * toInject element
+ * value: object to push
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * self success
* NULL error
*/
-smallJsont* injectNFreeArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
+smallArrayt* pushArraycSmallArray (smallArrayt *self, char **array);
/*
- * inject an element in self at index
+ * push the sObject pointer to array
+ * append value at the end of the list
+ * when s is NULL, NULL is pushed at the end of the list
*
- * return array with toInject at index
- * negative indexes are allowed
+//:define pushHelp
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+//:end
*
* \param
- * index in array
- * \param
- * toInject element
+ * value: object to push
* \return
- * array
- * unchanged array when array is NULL or invalid index
+ * self success
* NULL error
*/
-smallJsont* injectNFreeArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
-#define injectNFreeArraycO(self, index, toInject) (self)->f->injectNFreeArrayc(self, index, toInject)
-#define injectNFreeArraycG injectNFreeArraycO
+smallArrayt* pushArraycSmallArray (smallArrayt *self, char **array);
/*
- * inject an element in self at index
+ * push value to json
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
+smallJsont* pushArraycSmallJson (smallJsont *self, char **array);
/*
- * inject an element in self at index
+ * push value to json
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
- * \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
*/
-smallArrayt* injectNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
+smallJsont* pushArraycSmallJson (smallJsont *self, char **array);
+#define pushNFreeArraycO(self, array) (self)->f->pushNFreeArrayc(self, array)
+#define pushNFreeArraycG pushNFreeArraycO
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallJsont* injectNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
+smallArrayt* pushNFreeArraycSmallArray (smallArrayt *self, char **array);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallJsont* injectNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
-#define injectNFreeSmallBoolO(self, index, toInject) (self)->f->injectNFreeSmallBool(self, index, toInject)
-#define injectNFreeSmallBoolG injectNFreeSmallBoolO
+smallArrayt* pushNFreeArraycSmallArray (smallArrayt *self, char **array);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallArrayt* injectNFreeSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
+smallJsont* pushNFreeArraycSmallJson (smallJsont *self, char **array);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallArrayt* injectNFreeSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
+smallJsont* pushNFreeArraycSmallJson (smallJsont *self, char **array);
+#define pushNFreeSmallBytesO(self, value) (self)->f->pushNFreeSmallBytes(self, value)
+#define pushNFreeSmallBytesG pushNFreeSmallBytesO
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallJsont* injectNFreeSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
+smallArrayt* pushNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallJsont* injectNFreeSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
-#define injectNFreeSmallBytesO(self, index, toInject) (self)->f->injectNFreeSmallBytes(self, index, toInject)
-#define injectNFreeSmallBytesG injectNFreeSmallBytesO
+smallArrayt* pushNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallArrayt* injectNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
+smallJsont* pushNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * inject an element in self at index
+ * push element and free
*
- * return array with toInject at index
- * negative indexes are allowed
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * index in array
- * \param
- * toInject element
- * \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * value an object
*/
-smallArrayt* injectNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
+smallJsont* pushNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define popSmallBytesO(self) (self)->f->popSmallBytes(self)
+#define popSmallBytesG popSmallBytesO
/*
- * inject an element in self at index
+ * pop object
+ * return last object from list and remove last element from the list
*
- * return array with toInject at index
- * negative indexes are allowed
+ * \return
+ * last object pointer
+ * NULL when the list is NULL or empty (first element is NULL)
+ */
+smallBytest* popSmallBytesSmallArray (smallArrayt *self);
+/*
+ * pop object
+ * return last object from list and remove last element from the list
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * last object pointer
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* injectNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
+smallBytest* popSmallBytesSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * pop object
+ * return last object from list and remove last element from the list
*
- * return array with toInject at index
- * negative indexes are allowed
+ * \return
+ * last object pointer
+ * NULL when the list is NULL or empty (first element is NULL)
+ */
+smallBytest* popSmallBytesSmallJson (smallJsont *self);
+/*
+ * pop object
+ * return last object from list and remove last element from the list
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * last object pointer
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* injectNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
-#define injectNFreeSmallDoubleO(self, index, toInject) (self)->f->injectNFreeSmallDouble(self, index, toInject)
-#define injectNFreeSmallDoubleG injectNFreeSmallDoubleO
+smallBytest* popSmallBytesSmallJson (smallJsont *self);
+#define popNumO(self) (self)->f->popNum(self)
+#define popNumG popNumO
/*
- * inject an element in self at index
+ * pop number
*
- * return array with toInject at index
- * negative indexes are allowed
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * double type number or 0
*/
-smallArrayt* injectNFreeSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
+double popNumSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * pop number
*
- * return array with toInject at index
- * negative indexes are allowed
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * double type number or 0
*/
-smallArrayt* injectNFreeSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
+double popNumSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * pop number
*
- * return array with toInject at index
- * negative indexes are allowed
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * double type number or 0
*/
-smallJsont* injectNFreeSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
+double popNumSmallJson (smallJsont *self);
/*
- * inject an element in self at index
+ * pop number
*
- * return array with toInject at index
- * negative indexes are allowed
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * index in array
- * \param
- * toInject element
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * double type number or 0
*/
-smallJsont* injectNFreeSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
-#define injectNFreeSmallIntO(self, index, toInject) (self)->f->injectNFreeSmallInt(self, index, toInject)
-#define injectNFreeSmallIntG injectNFreeSmallIntO
+double popNumSmallJson (smallJsont *self);
+#define prependUndefinedO(self) (self)->f->prependUndefined(self)
+#define prependUndefinedG prependUndefinedO
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
+smallArrayt* prependUndefinedSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
+smallArrayt* prependUndefinedSmallArray (smallArrayt *self);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
+smallJsont* prependUndefinedSmallJson (smallJsont *self);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
-#define injectNFreeSmallStringO(self, index, toInject) (self)->f->injectNFreeSmallString(self, index, toInject)
-#define injectNFreeSmallStringG injectNFreeSmallStringO
+smallJsont* prependUndefinedSmallJson (smallJsont *self);
+#define prependBoolO(self, value) (self)->f->prependBool(self, value)
+#define prependBoolG prependBoolO
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallStringSmallArray (smallArrayt *self, intmax_t index, smallStringt *toInject);
+smallArrayt* prependBoolSmallArray (smallArrayt *self, bool value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallStringSmallArray (smallArrayt *self, intmax_t index, smallStringt *toInject);
+smallArrayt* prependBoolSmallArray (smallArrayt *self, bool value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallStringSmallJson (smallJsont *self, intmax_t index, smallStringt *toInject);
+smallJsont* prependBoolSmallJson (smallJsont *self, bool value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallStringSmallJson (smallJsont *self, intmax_t index, smallStringt *toInject);
-#define injectNFreeSmallContainerO(self, index, toInject) (self)->f->injectNFreeSmallContainer(self, index, toInject)
-#define injectNFreeSmallContainerG injectNFreeSmallContainerO
+smallJsont* prependBoolSmallJson (smallJsont *self, bool value);
+#define prependDoubleO(self, value) (self)->f->prependDouble(self, value)
+#define prependDoubleG prependDoubleO
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
+smallArrayt* prependDoubleSmallArray (smallArrayt *self, double value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallArrayt* injectNFreeSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
+smallArrayt* prependDoubleSmallArray (smallArrayt *self, double value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
+smallJsont* prependDoubleSmallJson (smallJsont *self, double value);
/*
- * inject an element in self at index
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * return array with toInject at index
- * negative indexes are allowed
+//:pushHelp
*
* \param
- * index in array
- * \param
- * toInject element
+ * value string to prepend
* \return
- * array
- * unchanged array when array is NULL or invalid index
- * NULL error
+ * self
*/
-smallJsont* injectNFreeSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
-#define sortFO(self, compareFunction) (self)->f->sortF(self, compareFunction)
-#define sortFG sortFO
+smallJsont* prependDoubleSmallJson (smallJsont *self, double value);
+#define prependIntO(self, value) (self)->f->prependInt(self, value)
+#define prependIntG prependIntO
/*
- * sort self according to the results from the compareFunction function
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * shCmpt is defined in libsheepy.h
- * typedef int (*shCmp)(const void * a, const void * b);
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * a and b are baset objects, cast to the correct class by using the object type
+ * The object is duplicated for:
+ * char *
*
- * cast macros: castS(s, S) and cast(smallArrayt*, a, A)
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * sorted list
- * NULL error
+ * self
*/
-smallArrayt* sortFSmallArray (smallArrayt *self, shCmpt compareFunction);
+smallArrayt* prependIntSmallArray (smallArrayt *self, int64_t value);
/*
- * sort self according to the results from the compareFunction function
- *
- * shCmpt is defined in libsheepy.h
- * typedef int (*shCmp)(const void * a, const void * b);
- *
- * a and b are baset objects, cast to the correct class by using the object type
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * cast macros: castS(s, S) and cast(smallArrayt*, a, A)
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * sorted list
- * NULL error
+ * self
*/
-smallArrayt* sortFSmallArray (smallArrayt *self, shCmpt compareFunction);
+smallArrayt* prependIntSmallArray (smallArrayt *self, int64_t value);
/*
- * sort self according to the results from the compareFunction function
- *
- * shCmpt is defined in libsheepy.h
- * typedef int (*shCmp)(const void * a, const void * b);
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * a and b are baset objects, cast to the correct class by using the object type
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * cast macros: castS(s, S) and cast(smallJsont*, a, A)
+ * The object is duplicated for:
+ * char *
*
+ * \param
+ * value string to prepend
* \return
- * sorted list
- * NULL error
+ * self
*/
-smallJsont* sortFSmallJson (smallJsont *self, shCmpt compareFunction);
+smallJsont* prependIntSmallJson (smallJsont *self, int64_t value);
/*
- * sort self according to the results from the compareFunction function
- *
- * shCmpt is defined in libsheepy.h
- * typedef int (*shCmp)(const void * a, const void * b);
- *
- * a and b are baset objects, cast to the correct class by using the object type
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * cast macros: castS(s, S) and cast(smallJsont*, a, A)
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * sorted list
- * NULL error
+ * self
*/
-smallJsont* sortFSmallJson (smallJsont *self, shCmpt compareFunction);
-#define equalO(self, array) (self)->f->equal(self, array)
-#define equalG equalO
+smallJsont* prependIntSmallJson (smallJsont *self, int64_t value);
+#define prependSO(self, string) (self)->f->prependS(self, string)
+#define prependSG prependSO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArray (smallArrayt *self, smallArrayt *array);
+smallArrayt* prependSSmallArray (smallArrayt *self, const char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArraySmallJson(smallArrayt *self, smallJsont *array);
+smallArrayt* prependSSmallArray (smallArrayt *self, const char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArrayArray (smallArrayt* self, char ** p2);
+smallJsont* prependSSmallJson (smallJsont *self, const char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArrayBase (smallArrayt* self, baset* p2);
+smallJsont* prependSSmallJson (smallJsont *self, const char *string);
/*
- * compare each element of self and list
+ * prepend string
+ * append string at the beginning of the list
+ * when string is NULL, the operation is canceled
*
* \param
- * list
- * \return
- * true the lists have identical elements
- * false they differ
+ * string: string to prepend
*/
-bool equalSmallArray (smallArrayt *self, smallArrayt *array);
+smallStringt* prependSSmallString (smallStringt *self, char *string);
+#define prependCharO(self, c) (self)->f->prependChar(self, c)
+#define prependCharG prependCharO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArraySmallJson(smallArrayt *self, smallJsont *array);
+smallArrayt* prependCharSmallArray (smallArrayt *self, char c);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArrayArray (smallArrayt* self, char ** p2);
+smallArrayt* prependCharSmallArray (smallArrayt *self, char c);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallArrayBase (smallArrayt* self, baset* p2);
+smallJsont* prependCharSmallJson (smallJsont *self, char c);
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * char*
- */
-bool equalSmallBoolChar(smallBoolt* self, const char * p2);
-/*
- * get a pointer to smallBool
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolBase(smallBoolt* self, baset* p2);
+smallJsont* prependCharSmallJson (smallJsont *self, char c);
/*
- * get a pointer to smallBool
+ * prepend string
+ * append string at the beginning of the list
+ * when string is NULL, the operation is canceled
*
- * \return
- * char*
+ * \param
+ * string: string to prepend
*/
-bool equalSmallBoolBool(smallBoolt* self, bool p2);
+smallStringt* prependCharSmallString (smallStringt *self, char c);
+#define prependDictO(self, dict) (self)->f->prependDict(self, dict)
+#define prependDictG prependDictO
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * char*
- */
-bool equalSmallBoolDouble(smallBoolt* self, double p2);
-/*
- * get a pointer to smallBool
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * char*
- */
-bool equalSmallBoolInt64(smallBoolt* self, int64_t p2);
-/*
- * get a pointer to smallBool
+ * The object is duplicated for:
+ * char *
*
- * \return
- * char*
- */
-bool equalSmallBoolInt32(smallBoolt* self, int32_t p2);
-/*
- * get a pointer to smallBool
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolUint32(smallBoolt* self, uint32_t p2);
+smallArrayt* prependDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * char*
- */
-bool equalSmallBoolUint64(smallBoolt* self, uint64_t p2);
-/*
- * get a pointer to smallBool
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBool(smallBoolt* self, smallBoolt* p2);
+smallArrayt* prependDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * char*
- */
-bool equalSmallBoolSmallDouble(smallBoolt* self, smallDoublet* p2);
-/*
- * get a pointer to smallBool
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolSmallInt(smallBoolt* self, smallIntt* p2);
+smallJsont* prependDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolSmallJson(smallBoolt* self, smallJsont* p2);
+smallJsont* prependDictSmallJson (smallJsont *self, smallDictt *dict);
+#define prependArrayO(self, array) (self)->f->prependArray(self, array)
+#define prependArrayG prependArrayO
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolSmallString(smallBoolt* self, smallStringt* p2);
+smallArrayt* prependArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * get a pointer to smallBool
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
+//:pushHelp
+ *
+ * \param
+ * value string to prepend
* \return
- * char*
+ * self
*/
-bool equalSmallBoolSmallBytes(smallBoolt* self, smallBytest* p2);
+smallArrayt* prependArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytes(smallBytest *self, smallBytest *value);
+smallJsont* prependArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesBool(smallBytest *self, bool value);
+smallJsont* prependArraySmallJson (smallJsont *self, smallArrayt *array);
+#define prependArraycO(self, array) (self)->f->prependArrayc(self, array)
+#define prependArraycG prependArraycO
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesDouble(smallBytest *self, double value);
+smallArrayt* prependArraycSmallArray (smallArrayt *self, char **array);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesInt64(smallBytest *self, int64_t value);
+smallArrayt* prependArraycSmallArray (smallArrayt *self, char **array);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesInt32(smallBytest *self, int32_t value);
+smallJsont* prependArraycSmallJson (smallJsont *self, char **array);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesUint32(smallBytest *self, uint32_t value);
+smallJsont* prependArraycSmallJson (smallJsont *self, char **array);
+#define prependSmallBoolO(self, value) (self)->f->prependSmallBool(self, value)
+#define prependSmallBoolG prependSmallBoolO
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesUint64(smallBytest *self, uint64_t value);
+smallArrayt* prependSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesSmallBool(smallBytest *self, smallBoolt *value);
+smallArrayt* prependSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesSmallDouble(smallBytest *self, smallDoublet *value);
+smallJsont* prependSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesSmallInt(smallBytest *self, smallIntt *value);
+smallJsont* prependSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define prependSmallBytesO(self, value) (self)->f->prependSmallBytes(self, value)
+#define prependSmallBytesG prependSmallBytesO
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesChar(smallBytest *self, const char *value);
+smallArrayt* prependSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
+ * self
*/
-bool equalSmallBytesSmallString(smallBytest *self, smallStringt *value);
+smallArrayt* prependSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * equal
- * compare self to value
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * value to compare
+ * value string to prepend
* \return
- * true self and value have identical content
- * false they differ
- */
-bool equalSmallBytesBase(smallBytest *self, baset *value);
-/*
- * add merge - already existing values are kept
- */
-bool equalSmallDictBase (smallDictt* self, baset* p2);
-/*
- * add merge - already existing values are kept
- */
-bool equalSmallDictSmallJson (smallDictt* self, smallJsont* p2);
-/*
- * add merge - already existing values are kept
+ * self
*/
-bool equalSmallDict (smallDictt* self, smallDictt* p2);
+smallJsont* prependSmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDoubleCha(smallDoublet* self, char p2);
-/*
- * get a pointer to double
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * double*
+ * self
*/
-bool equalSmallDoubleChar(smallDoublet* self, const char * p2);
+smallJsont* prependSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define prependSmallDoubleO(self, value) (self)->f->prependSmallDouble(self, value)
+#define prependSmallDoubleG prependSmallDoubleO
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDoubleBase(smallDoublet* self, baset* p2);
-/*
- * get a pointer to double
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * double*
- */
-bool equalSmallDoubleBool(smallDoublet* self, bool p2);
-/*
- * get a pointer to double
+ * The object is duplicated for:
+ * char *
*
- * \return
- * double*
- */
-bool equalSmallDoubleDouble(smallDoublet* self, double p2);
-/*
- * get a pointer to double
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * double*
+ * self
*/
-bool equalSmallDoubleInt64(smallDoublet* self, int64_t p2);
+smallArrayt* prependSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDoubleInt32(smallDoublet* self, int32_t p2);
-/*
- * get a pointer to double
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * double*
+ * self
*/
-bool equalSmallDoubleUint32(smallDoublet* self, uint32_t p2);
+smallArrayt* prependSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDoubleUint64(smallDoublet* self, uint64_t p2);
-/*
- * get a pointer to double
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * double*
- */
-bool equalSmallDoubleSmallBool(smallDoublet* self, smallBoolt* p2);
-/*
- * get a pointer to double
+ * The object is duplicated for:
+ * char *
*
+ * \param
+ * value string to prepend
* \return
- * double*
+ * self
*/
-bool equalSmallDoubleSmallBytes(smallDoublet* self, smallBytest* p2);
+smallJsont* prependSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDouble(smallDoublet* self, smallDoublet* p2);
-/*
- * get a pointer to double
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * double*
+ * self
*/
-bool equalSmallDoubleSmallInt(smallDoublet* self, smallIntt* p2);
+smallJsont* prependSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define prependSmallIntO(self, value) (self)->f->prependSmallInt(self, value)
+#define prependSmallIntG prependSmallIntO
/*
- * get a pointer to double
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * double*
- */
-bool equalSmallDoubleSmallJson(smallDoublet* self, smallJsont* p2);
-/*
- * get a pointer to double
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * double*
- */
-bool equalSmallDoubleSmallString(smallDoublet* self, smallStringt* p2);
-/*
- * get a pointer to int
+ * The object is duplicated for:
+ * char *
*
- * \return
- * int
- */
-bool equalSmallIntCha (smallIntt* self, char p2);
-/*
- * get a pointer to int
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntChar (smallIntt* self, const char * p2);
+smallArrayt* prependSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * int
- */
-bool equalSmallIntBase (smallIntt* self, baset* p2);
-/*
- * get a pointer to int
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntBool (smallIntt* self, bool p2);
+smallArrayt* prependSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * int
- */
-bool equalSmallIntDouble (smallIntt* self, double p2);
-/*
- * get a pointer to int
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * int
- */
-bool equalSmallIntInt64 (smallIntt* self, int64_t p2);
-/*
- * get a pointer to int
+ * The object is duplicated for:
+ * char *
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntInt32 (smallIntt* self, int32_t p2);
+smallJsont* prependSmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * int
- */
-bool equalSmallIntUint32 (smallIntt* self, uint32_t p2);
-/*
- * get a pointer to int
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntUint64 (smallIntt* self, uint64_t p2);
+smallJsont* prependSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define prependSmallContainerO(self, container) (self)->f->prependSmallContainer(self, container)
+#define prependSmallContainerG prependSmallContainerO
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \return
- * int
- */
-bool equalSmallIntSmallBool (smallIntt* self, smallBoolt* p2);
-/*
- * get a pointer to int
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \return
- * int
- */
-bool equalSmallIntSmallBytes (smallIntt* self, smallBytest* p2);
-/*
- * get a pointer to int
+ * The object is duplicated for:
+ * char *
*
- * \return
- * int
- */
-bool equalSmallIntSmallDouble(smallIntt* self, smallDoublet* p2);
-/*
- * get a pointer to int
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallInt (smallIntt* self, smallIntt* p2);
+smallArrayt* prependSmallContainerSmallArray (smallArrayt *self, smallContainert *container);
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntSmallJson (smallIntt* self, smallJsont* p2);
+smallArrayt* prependSmallContainerSmallArray (smallArrayt *self, smallContainert *container);
/*
- * get a pointer to int
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
+ * \param
+ * value string to prepend
* \return
- * int
+ * self
*/
-bool equalSmallIntSmallString(smallIntt* self, smallStringt* p2);
+smallJsont* prependSmallContainerSmallJson (smallJsont *self, smallContainert *container);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
+smallJsont* prependSmallContainerSmallJson (smallJsont *self, smallContainert *container);
+#define prependNFreeUndefinedO(self, undefined) (self)->f->prependNFreeUndefined(self, undefined)
+#define prependNFreeUndefinedG prependNFreeUndefinedO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonArray (smallJsont *self, char ** p2);
+smallArrayt* prependNFreeUndefinedSmallArray (smallArrayt *self, undefinedt *undefined);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonBase (smallJsont *self, baset* p2);
+smallArrayt* prependNFreeUndefinedSmallArray (smallArrayt *self, undefinedt *undefined);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
*
- * \param
- * list
- * \return
- * true the lists have identical elements
- * false they differ
- */
-bool equalSmallJsonCha (smallJsont* self, char p2);
-/*
- * compare each element of self and list
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \param
- * list
- * \return
- * true the lists have identical elements
- * false they differ
- */
-bool equalSmallJsonChar (smallJsont* self, const char * p2);
-/*
- * compare each element of self and list
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonBool (smallJsont* self, bool p2);
+smallJsont* prependNFreeUndefinedSmallJson (smallJsont *self, undefinedt *undefined);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonDouble (smallJsont* self, double p2);
+smallJsont* prependNFreeUndefinedSmallJson (smallJsont *self, undefinedt *undefined);
+#define prependNFreeSO(self, string) (self)->f->prependNFreeS(self, string)
+#define prependNFreeSG prependNFreeSO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonInt64 (smallJsont* self, int64_t p2);
+smallArrayt* prependNFreeSSmallArray (smallArrayt *self, char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonInt32 (smallJsont* self, int32_t p2);
+smallArrayt* prependNFreeSSmallArray (smallArrayt *self, char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonUint32 (smallJsont* self, uint32_t p2);
+smallJsont* prependNFreeSSmallJson (smallJsont *self, char *string);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonUint64 (smallJsont* self, uint64_t p2);
+smallJsont* prependNFreeSSmallJson (smallJsont *self, char *string);
+#define prependNFreeDictO(self, dict) (self)->f->prependNFreeDict(self, dict)
+#define prependNFreeDictG prependNFreeDictO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallBool (smallJsont* self, smallBoolt* p2);
+smallArrayt* prependNFreeDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallBytes (smallJsont* self, smallBytest* p2);
+smallArrayt* prependNFreeDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallDouble (smallJsont* self, smallDoublet* p2);
+smallJsont* prependNFreeDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallInt (smallJsont* self, smallIntt* p2);
+smallJsont* prependNFreeDictSmallJson (smallJsont *self, smallDictt *dict);
+#define prependNFreeArrayO(self, array) (self)->f->prependNFreeArray(self, array)
+#define prependNFreeArrayG prependNFreeArrayO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
+smallArrayt* prependNFreeArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallString (smallJsont* self, smallStringt* p2);
+smallArrayt* prependNFreeArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
+smallJsont* prependNFreeArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
+smallJsont* prependNFreeArraySmallJson (smallJsont *self, smallArrayt *array);
+#define prependNFreeArraycO(self, array) (self)->f->prependNFreeArrayc(self, array)
+#define prependNFreeArraycG prependNFreeArraycO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonArray (smallJsont *self, char ** p2);
+smallArrayt* prependNFreeArraycSmallArray (smallArrayt *self, char **array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonBase (smallJsont *self, baset* p2);
+smallArrayt* prependNFreeArraycSmallArray (smallArrayt *self, char **array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonCha (smallJsont* self, char p2);
+smallJsont* prependNFreeArraycSmallJson (smallJsont *self, char **array);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonChar (smallJsont* self, const char * p2);
+smallJsont* prependNFreeArraycSmallJson (smallJsont *self, char **array);
+#define prependNFreeSmallBoolO(self, value) (self)->f->prependNFreeSmallBool(self, value)
+#define prependNFreeSmallBoolG prependNFreeSmallBoolO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonBool (smallJsont* self, bool p2);
+smallArrayt* prependNFreeSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonDouble (smallJsont* self, double p2);
+smallArrayt* prependNFreeSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonInt64 (smallJsont* self, int64_t p2);
+smallJsont* prependNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonInt32 (smallJsont* self, int32_t p2);
+smallJsont* prependNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define prependNFreeSmallBytesO(self, value) (self)->f->prependNFreeSmallBytes(self, value)
+#define prependNFreeSmallBytesG prependNFreeSmallBytesO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonUint32 (smallJsont* self, uint32_t p2);
+smallArrayt* prependNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonUint64 (smallJsont* self, uint64_t p2);
+smallArrayt* prependNFreeSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallBool (smallJsont* self, smallBoolt* p2);
+smallJsont* prependNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallBytes (smallJsont* self, smallBytest* p2);
+smallJsont* prependNFreeSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define prependNFreeSmallDoubleO(self, value) (self)->f->prependNFreeSmallDouble(self, value)
+#define prependNFreeSmallDoubleG prependNFreeSmallDoubleO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallDouble (smallJsont* self, smallDoublet* p2);
+smallArrayt* prependNFreeSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallInt (smallJsont* self, smallIntt* p2);
+smallArrayt* prependNFreeSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
+smallJsont* prependNFreeSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallString (smallJsont* self, smallStringt* p2);
+smallJsont* prependNFreeSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define prependNFreeSmallIntO(self, value) (self)->f->prependNFreeSmallInt(self, value)
+#define prependNFreeSmallIntG prependNFreeSmallIntO
/*
- * compare each element of self and list
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * list
+ * value string to prepend
* \return
- * true the lists have identical elements
- * false they differ
+ * self
*/
-bool equalSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
+smallArrayt* prependNFreeSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallString (smallStringt *self, smallStringt *string);
+smallArrayt* prependNFreeSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringBase (smallStringt* self, baset* p2);
+smallJsont* prependNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringBool (smallStringt* self, bool p2);
+smallJsont* prependNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define prependNFreeSmallStringO(self, string) (self)->f->prependNFreeSmallString(self, string)
+#define prependNFreeSmallStringG prependNFreeSmallStringO
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringDouble (smallStringt* self, double p2);
+smallArrayt* prependNFreeSmallStringSmallArray (smallArrayt *self, smallStringt *string);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringInt64 (smallStringt* self, int64_t p2);
+smallArrayt* prependNFreeSmallStringSmallArray (smallArrayt *self, smallStringt *string);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringInt32 (smallStringt* self, int32_t p2);
+smallJsont* prependNFreeSmallStringSmallJson (smallJsont *self, smallStringt *string);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringUint32 (smallStringt* self, uint32_t p2);
+smallJsont* prependNFreeSmallStringSmallJson (smallJsont *self, smallStringt *string);
+#define prependNFreeSmallContainerO(self, container) (self)->f->prependNFreeSmallContainer(self, container)
+#define prependNFreeSmallContainerG prependNFreeSmallContainerO
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringUint64 (smallStringt* self, uint64_t p2);
+smallArrayt* prependNFreeSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringSmallBool(smallStringt* self, smallBoolt* p2);
+smallArrayt* prependNFreeSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringSmallBytes(smallStringt* self, smallBytest* p2);
+smallJsont* prependNFreeSmallContainerSmallJson(smallJsont *self, smallContainert *container);
/*
- * equal
- * compare self to smallString
+ * prepend object
+ * append object pointer at the beginning of the list
+ * when value is NULL, the operation is canceled
+ *
+//:pushHelp
*
* \param
- * smallString to compare
+ * value string to prepend
* \return
- * true the smallStrings have identical content
- * false they differ
+ * self
*/
-bool equalSmallStringSmallDouble(smallStringt* self, smallDoublet* p2);
+smallJsont* prependNFreeSmallContainerSmallJson(smallJsont *self, smallContainert *container);
+#define dequeueUndefinedO(self) (self)->f->dequeueUndefined(self)
+#define dequeueUndefinedG dequeueUndefinedO
/*
- * equal
- * compare self to smallString
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * smallString to compare
* \return
- * true the smallStrings have identical content
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool equalSmallStringSmallInt(smallStringt* self, smallIntt* p2);
+undefinedt* dequeueUndefinedSmallArray (smallArrayt *self);
/*
- * equal
- * compare self to smallString
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * smallString to compare
* \return
- * true the smallStrings have identical content
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool equalSmallStringSmallJson(smallStringt* self, smallJsont* p2);
-#define equalSmallJsonO(self, array) (self)->f->equalSmallJson(self, array)
-#define equalSmallJsonG equalSmallJsonO
+undefinedt* dequeueUndefinedSmallArray (smallArrayt *self);
/*
- * compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
+undefinedt* dequeueUndefinedSmallJson (smallJsont *self);
/*
- * compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
-#define equalArrayO(self, p2) (self)->f->equalArray(self, p2)
-#define equalArrayG equalArrayO
-#define equalBaseO(self, p2) (self)->f->equalBase(self, p2)
-#define equalBaseG equalBaseO
-#define icEqualO(self, array) (self)->f->icEqual(self, array)
-#define icEqualG icEqualO
+undefinedt* dequeueUndefinedSmallJson (smallJsont *self);
+#define dequeueBoolO(self) (self)->f->dequeueBool(self)
+#define dequeueBoolG dequeueBoolO
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArray (smallArrayt *self, smallArrayt *array);
+bool dequeueBoolSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArraySmallJson(smallArrayt *self, smallJsont *array);
+bool dequeueBoolSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArrayArray (smallArrayt* self, char ** p2);
+bool dequeueBoolSmallJson (smallJsont *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArrayBase (smallArrayt* self, baset* p2);
+bool dequeueBoolSmallJson (smallJsont *self);
+#define dequeueDoubleO(self) (self)->f->dequeueDouble(self)
+#define dequeueDoubleG dequeueDoubleO
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArray (smallArrayt *self, smallArrayt *array);
+double dequeueDoubleSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArraySmallJson(smallArrayt *self, smallJsont *array);
+double dequeueDoubleSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallArrayArray (smallArrayt* self, char ** p2);
+double dequeueDoubleSmallJson (smallJsont *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
- */
-bool icEqualSmallArrayBase (smallArrayt* self, baset* p2);
-/*
- * add merge - already existing values are kept
- */
-bool icEqualSmallDictBase (smallDictt* self, baset* p2);
-/*
- * add merge - already existing values are kept
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallDictSmallJson(smallDictt* self, smallJsont* p2);
+double dequeueDoubleSmallJson (smallJsont *self);
+#define dequeueIntO(self) (self)->f->dequeueInt(self)
+#define dequeueIntG dequeueIntO
/*
- * add merge - already existing values are kept
+ * dequeue object
+ * return first object from list and remove it from the list
+ *
+ * \return
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallDict (smallDictt* self, smallDictt* p2);
+int64_t dequeueIntSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
+int64_t dequeueIntSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonArray (smallJsont *self, char ** p2);
+int64_t dequeueIntSmallJson (smallJsont *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonBase (smallJsont *self, baset* p2);
+int64_t dequeueIntSmallJson (smallJsont *self);
+#define dequeueInt32O(self) (self)->f->dequeueInt32(self)
+#define dequeueInt32G dequeueInt32O
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
+int32_t dequeueInt32SmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
+int32_t dequeueInt32SmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallString(smallJsont *self, smallStringt *string);
+int32_t dequeueInt32SmallJson (smallJsont *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
+int32_t dequeueInt32SmallJson (smallJsont *self);
+#define dequeueUintO(self) (self)->f->dequeueUint(self)
+#define dequeueUintG dequeueUintO
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonArray (smallJsont *self, char ** p2);
+uint64_t dequeueUintSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonBase (smallJsont *self, baset* p2);
+uint64_t dequeueUintSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
+uint64_t dequeueUintSmallJson (smallJsont *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
+uint64_t dequeueUintSmallJson (smallJsont *self);
+#define dequeueUint32O(self) (self)->f->dequeueUint32(self)
+#define dequeueUint32G dequeueUint32O
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallString(smallJsont *self, smallStringt *string);
+uint32_t dequeueUint32SmallArray (smallArrayt *self);
/*
- * ignore case equal
- * compare self to smallString
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * smallString to compare
* \return
- * true the smallStrings have identical content
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallString (smallStringt *self, smallStringt *string);
+uint32_t dequeueUint32SmallArray (smallArrayt *self);
/*
- * ignore case equal
- * compare self to smallString
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * smallString to compare
* \return
- * true the smallStrings have identical content
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallStringBase (smallStringt* self, baset* p2);
+uint32_t dequeueUint32SmallJson (smallJsont *self);
/*
- * ignore case equal
- * compare self to smallString
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * smallString to compare
* \return
- * true the smallStrings have identical content
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallStringSmallJson(smallStringt* self, smallJsont* p2);
-#define icEqualSmallJsonO(self, array) (self)->f->icEqualSmallJson(self, array)
-#define icEqualSmallJsonG icEqualSmallJsonO
+uint32_t dequeueUint32SmallJson (smallJsont *self);
+#define dequeueSO(self) (self)->f->dequeueS(self)
+#define dequeueSG dequeueSO
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
+char* dequeueSSmallArray (smallArrayt *self);
/*
- * ignore case and compare each element of self and list
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * list
* \return
- * true the lists have identical elements
- * false they differ
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
-#define setAtCharO(self, index, c) (self)->f->setAtChar(self, index, c)
-#define setAtCharG setAtCharO
+char* dequeueSSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtCharSmallArray (smallArrayt *self, intmax_t index, char c);
+char* dequeueSSmallJson (smallJsont *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtCharSmallArray (smallArrayt *self, intmax_t index, char c);
+char* dequeueSSmallJson (smallJsont *self);
+#define dequeueDictO(self) (self)->f->dequeueDict(self)
+#define dequeueDictG dequeueDictO
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtCharSmallJson (smallJsont *self, intmax_t index, char c);
+smallDictt* dequeueDictSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtCharSmallJson (smallJsont *self, intmax_t index, char c);
-#define setAtArraycO(self, index, array) (self)->f->setAtArrayc(self, index, array)
-#define setAtArraycG setAtArraycO
+smallDictt* dequeueDictSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
+smallDictt* dequeueDictSmallJson (smallJsont *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
+smallDictt* dequeueDictSmallJson (smallJsont *self);
+#define dequeueArrayO(self) (self)->f->dequeueArray(self)
+#define dequeueArrayG dequeueArrayO
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtArraycSmallJson (smallJsont *self, intmax_t index, char **array);
+smallArrayt* dequeueArraySmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtArraycSmallJson (smallJsont *self, intmax_t index, char **array);
-#define setAtSmallBytesO(self, index, value) (self)->f->setAtSmallBytes(self, index, value)
-#define setAtSmallBytesG setAtSmallBytesO
+smallArrayt* dequeueArraySmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
+smallArrayt* dequeueArraySmallJson (smallJsont *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
+smallArrayt* dequeueArraySmallJson (smallJsont *self);
+#define dequeueSmallBoolO(self) (self)->f->dequeueSmallBool(self)
+#define dequeueSmallBoolG dequeueSmallBoolO
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
+smallBoolt* dequeueSmallBoolSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements when baset *value is NULL)
- * index can be negative
- *
-//:pushHelp
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
-#define setAtNFreeArraycO(self, index, array) (self)->f->setAtNFreeArrayc(self, index, array)
-#define setAtNFreeArraycG setAtNFreeArraycO
+smallBoolt* dequeueSmallBoolSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
+smallBoolt* dequeueSmallBoolSmallJson (smallJsont *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
+smallBoolt* dequeueSmallBoolSmallJson (smallJsont *self);
+#define dequeueSmallBytesO(self) (self)->f->dequeueSmallBytes(self)
+#define dequeueSmallBytesG dequeueSmallBytesO
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **array);
+smallBytest* dequeueSmallBytesSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **array);
-#define setAtNFreeSmallBytesO(self, index, value) (self)->f->setAtNFreeSmallBytes(self, index, value)
-#define setAtNFreeSmallBytesG setAtNFreeSmallBytesO
+smallBytest* dequeueSmallBytesSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
+smallBytest* dequeueSmallBytesSmallJson (smallJsont *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setAtNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
+smallBytest* dequeueSmallBytesSmallJson (smallJsont *self);
+#define dequeueSmallDoubleO(self) (self)->f->dequeueSmallDouble(self)
+#define dequeueSmallDoubleG dequeueSmallDoubleO
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
+smallDoublet* dequeueSmallDoubleSmallArray (smallArrayt *self);
/*
- * store object at given index (free already existing elements)
- * index can be negative
- *
- * the object parameter is freed
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setAtNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
-#define setPAtSmallJsonO(self, index, json) (self)->f->setPAtSmallJson(self, index, json)
-#define setPAtSmallJsonG setPAtSmallJsonO
+smallDoublet* dequeueSmallDoubleSmallArray (smallArrayt *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setPAtSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
+smallDoublet* dequeueSmallDoubleSmallJson (smallJsont *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setPAtSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
+smallDoublet* dequeueSmallDoubleSmallJson (smallJsont *self);
+#define dequeueSmallIntO(self) (self)->f->dequeueSmallInt(self)
+#define dequeueSmallIntG dequeueSmallIntO
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setPAtSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
+smallIntt* dequeueSmallIntSmallArray (smallArrayt *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setPAtSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
-#define setPAtNFreeSmallJsonO(self, index, json) (self)->f->setPAtNFreeSmallJson(self, index, json)
-#define setPAtNFreeSmallJsonG setPAtNFreeSmallJsonO
+smallIntt* dequeueSmallIntSmallArray (smallArrayt *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setPAtNFreeSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
+smallIntt* dequeueSmallIntSmallJson (smallJsont *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallArrayt* setPAtNFreeSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
+smallIntt* dequeueSmallIntSmallJson (smallJsont *self);
+#define dequeueSmallStringO(self) (self)->f->dequeueSmallString(self)
+#define dequeueSmallStringG dequeueSmallStringO
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setPAtNFreeSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
+smallStringt* dequeueSmallStringSmallArray (smallArrayt *self);
/*
- * store pointer at given index (existing element is not freed)
- * index can be negative
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * index: index in array, must be inside the array
- * string
* \return
- * 0 success
- * -1 error
- *
- * Does nothing when:
- * when array is NULL, index is not set correctly or s is NULL
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-smallJsont* setPAtNFreeSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
-#define hasUndefinedO(self, undefined) (self)->f->hasUndefined(self, undefined)
-#define hasUndefinedG hasUndefinedO
+smallStringt* dequeueSmallStringSmallArray (smallArrayt *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+smallStringt* dequeueSmallStringSmallJson (smallJsont *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+smallStringt* dequeueSmallStringSmallJson (smallJsont *self);
+#define dequeueVoidO(self) (self)->f->dequeueVoid(self)
+#define dequeueVoidG dequeueVoidO
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+void* dequeueVoidSmallArray (smallArrayt *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
-#define hasBoolO(self, value) (self)->f->hasBool(self, value)
-#define hasBoolG hasBoolO
+void* dequeueVoidSmallArray (smallArrayt *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasBoolSmallArray (smallArrayt *self, bool value);
+void* dequeueVoidSmallJson (smallJsont *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasBoolSmallArray (smallArrayt *self, bool value);
+void* dequeueVoidSmallJson (smallJsont *self);
+#define dequeueSmallContainerO(self) (self)->f->dequeueSmallContainer(self)
+#define dequeueSmallContainerG dequeueSmallContainerO
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasBoolSmallJson (smallJsont *self, bool value);
+smallContainert* dequeueSmallContainerSmallArray(smallArrayt *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasBoolSmallJson (smallJsont *self, bool value);
-#define hasDoubleO(self, value) (self)->f->hasDouble(self, value)
-#define hasDoubleG hasDoubleO
+smallContainert* dequeueSmallContainerSmallArray(smallArrayt *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasDoubleSmallArray (smallArrayt *self, double value);
+smallContainert* dequeueSmallContainerSmallJson(smallJsont *self);
/*
- * check if self has object
+ * dequeue object
+ * return first object from list and remove it from the list
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * first object
+ * NULL when the list is NULL or empty (first element is NULL)
*/
-bool hasDoubleSmallArray (smallArrayt *self, double value);
+smallContainert* dequeueSmallContainerSmallJson(smallJsont *self);
+#define dequeueNumO(self) (self)->f->dequeueNum(self)
+#define dequeueNumG dequeueNumO
/*
- * check if self has object
+ * dequeue number
+ *
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * double type number or 0
*/
-bool hasDoubleSmallJson (smallJsont *self, double value);
+double dequeueNumSmallArray (smallArrayt *self);
/*
- * check if self has object
+ * dequeue number
+ *
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * double type number or 0
*/
-bool hasDoubleSmallJson (smallJsont *self, double value);
-#define hasIntO(self, value) (self)->f->hasInt(self, value)
-#define hasIntG hasIntO
+double dequeueNumSmallArray (smallArrayt *self);
/*
- * check if self has object
+ * dequeue number
+ *
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * double type number or 0
*/
-bool hasIntSmallArray (smallArrayt *self, int64_t value);
+double dequeueNumSmallJson (smallJsont *self);
/*
- * check if self has object
+ * dequeue number
+ *
+ * if the element is a double, its value is returned as is
+ * if the element is an int, its value is converted to double
+ * if the element is not a number, 0 is returned
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * double type number or 0
*/
-bool hasIntSmallArray (smallArrayt *self, int64_t value);
+double dequeueNumSmallJson (smallJsont *self);
+#define appendArrayO(self, array) (self)->f->appendArray(self, array)
+#define appendArrayG appendArrayO
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasIntSmallJson (smallJsont *self, int64_t value);
+smallArrayt* appendArraySmallArray (smallArrayt *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasIntSmallJson (smallJsont *self, int64_t value);
-#define hasSO(self, string) (self)->f->hasS(self, string)
-#define hasSG hasSO
+smallArrayt* appendArraySmallArray (smallArrayt *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasSSmallArray (smallArrayt *self, const char *string);
+smallJsont* appendArraySmallJson (smallJsont *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasSSmallArray (smallArrayt *self, const char *string);
+smallJsont* appendArraySmallJson (smallJsont *self, char **array);
+#define appendNSmashArrayO(self, array) (self)->f->appendNSmashArray(self, array)
+#define appendNSmashArrayG appendNSmashArrayO
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasSSmallJson (smallJsont *self, const char *string);
+smallArrayt* appendNSmashArraySmallArray (smallArrayt *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasSSmallJson (smallJsont *self, const char *string);
-#define hasCharO(self, c) (self)->f->hasChar(self, c)
-#define hasCharG hasCharO
+smallArrayt* appendNSmashArraySmallArray (smallArrayt *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasCharSmallArray (smallArrayt *self, char c);
+smallJsont* appendNSmashArraySmallJson(smallJsont *self, char **array);
/*
- * check if self has object
+ * append array at the end of self by copying the pointers
+ * from array to self.
+ * After this function, free array with dispose/smash instead of free/terminate
*
* \param
- * object to find
+ * array
* \return
- * true when the object is found
+ * self and array in self
+ * self not modified when self and array are NULL
+ * or when self is identical to array (same pointers)
+ * 0 success
+ * -1 error
*/
-bool hasCharSmallArray (smallArrayt *self, char c);
+smallJsont* appendNSmashArraySmallJson(smallJsont *self, char **array);
+#define cropElemUndefinedO(self, index) (self)->f->cropElemUndefined(self, index)
+#define cropElemUndefinedG cropElemUndefinedO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasCharSmallJson (smallJsont *self, char c);
+undefinedt* cropElemUndefinedSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasCharSmallJson (smallJsont *self, char c);
+undefinedt* cropElemUndefinedSmallArray (smallArrayt *self, intmax_t index);
/*
- * has SmallString
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * needle: smallString to find
+ * key must exist in the dictionary
* \return
- * pointer to first occurence of needle in smallString
- * NULL when needle is not found
- * NULL when smallString or needle are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* hasCharSmallString (smallStringt *self, char c);
-#define hasDictO(self, dict) (self)->f->hasDict(self, dict)
-#define hasDictG hasDictO
+undefinedt* cropElemUndefinedSmallDict (smallDictt *self, char* key);
+#define cropElemBoolO(self, index) (self)->f->cropElemBool(self, index)
+#define cropElemBoolG cropElemBoolO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasDictSmallArray (smallArrayt *self, smallDictt *dict);
+bool cropElemBoolSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasDictSmallArray (smallArrayt *self, smallDictt *dict);
+bool cropElemBoolSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasDictSmallJson (smallJsont *self, smallDictt *dict);
+bool cropElemBoolSmallDict (smallDictt *self, char* key);
+#define cropElemDoubleO(self, index) (self)->f->cropElemDouble(self, index)
+#define cropElemDoubleG cropElemDoubleO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasDictSmallJson (smallJsont *self, smallDictt *dict);
-#define hasArrayO(self, array) (self)->f->hasArray(self, array)
-#define hasArrayG hasArrayO
+double cropElemDoubleSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasArraySmallArray (smallArrayt *self, smallArrayt *array);
+double cropElemDoubleSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasArraySmallArray (smallArrayt *self, smallArrayt *array);
+double cropElemDoubleSmallDict (smallDictt *self, char* key);
+#define cropElemIntO(self, index) (self)->f->cropElemInt(self, index)
+#define cropElemIntG cropElemIntO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasArraySmallJson (smallJsont *self, smallArrayt *array);
+int64_t cropElemIntSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasArraySmallJson (smallJsont *self, smallArrayt *array);
-#define hasArraycO(self, array) (self)->f->hasArrayc(self, array)
-#define hasArraycG hasArraycO
+int64_t cropElemIntSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasArraycSmallArray (smallArrayt *self, char **array);
+int64_t cropElemIntSmallDict (smallDictt *self, char* key);
+#define cropElemInt32O(self, index) (self)->f->cropElemInt32(self, index)
+#define cropElemInt32G cropElemInt32O
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasArraycSmallArray (smallArrayt *self, char **array);
+int32_t cropElemInt32SmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasArraycSmallJson (smallJsont *self, char **array);
+int32_t cropElemInt32SmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasArraycSmallJson (smallJsont *self, char **array);
-#define hasSmallBoolO(self, value) (self)->f->hasSmallBool(self, value)
-#define hasSmallBoolG hasSmallBoolO
+int32_t cropElemInt32SmallDict (smallDictt *self, char* key);
+#define cropElemUintO(self, index) (self)->f->cropElemUint(self, index)
+#define cropElemUintG cropElemUintO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+uint64_t cropElemUintSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+uint64_t cropElemUintSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+uint64_t cropElemUintSmallDict (smallDictt *self, char* key);
+#define cropElemUint32O(self, index) (self)->f->cropElemUint32(self, index)
+#define cropElemUint32G cropElemUint32O
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define hasSmallBytesO(self, value) (self)->f->hasSmallBytes(self, value)
-#define hasSmallBytesG hasSmallBytesO
+uint32_t cropElemUint32SmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+uint32_t cropElemUint32SmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+uint32_t cropElemUint32SmallDict (smallDictt *self, char* key);
+#define cropElemSO(self, index) (self)->f->cropElemS(self, index)
+#define cropElemSG cropElemSO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+char* cropElemSSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define hasSmallDoubleO(self, value) (self)->f->hasSmallDouble(self, value)
-#define hasSmallDoubleG hasSmallDoubleO
+char* cropElemSSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+char* cropElemSSmallDict (smallDictt *self, char* key);
+#define cropElemDictO(self, index) (self)->f->cropElemDict(self, index)
+#define cropElemDictG cropElemDictO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+smallDictt* cropElemDictSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+smallDictt* cropElemDictSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define hasSmallIntO(self, value) (self)->f->hasSmallInt(self, value)
-#define hasSmallIntG hasSmallIntO
+smallDictt* cropElemDictSmallDict (smallDictt *self, char* key);
+#define cropElemArrayO(self, index) (self)->f->cropElemArray(self, index)
+#define cropElemArrayG cropElemArrayO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallArrayt* cropElemArraySmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallArrayt* cropElemArraySmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallIntSmallJson (smallJsont *self, smallIntt *value);
+smallArrayt* cropElemArraySmallDict (smallDictt *self, char* key);
+#define cropElemSmallBoolO(self, index) (self)->f->cropElemSmallBool(self, index)
+#define cropElemSmallBoolG cropElemSmallBoolO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define hasSmallContainerO(self, container) (self)->f->hasSmallContainer(self, container)
-#define hasSmallContainerG hasSmallContainerO
+smallBoolt* cropElemSmallBoolSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
+smallBoolt* cropElemSmallBoolSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * object to find
+ * key must exist in the dictionary
* \return
- * true when the object is found
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-bool hasSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
+smallBoolt* cropElemSmallBoolSmallDict (smallDictt *self, char* key);
+#define cropElemSmallBytesO(self, index) (self)->f->cropElemSmallBytes(self, index)
+#define cropElemSmallBytesG cropElemSmallBytesO
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallContainerSmallJson(smallJsont *self, smallContainert *container);
+smallBytest* cropElemSmallBytesSmallArray (smallArrayt *self, intmax_t index);
/*
- * check if self has object
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index must be in the list
* \return
- * true when the object is found
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool hasSmallContainerSmallJson(smallJsont *self, smallContainert *container);
-#define indexOfUndefinedO(self, undefined) (self)->f->indexOfUndefined(self, undefined)
-#define indexOfUndefinedG indexOfUndefinedO
+smallBytest* cropElemSmallBytesSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+smallBytest* cropElemSmallBytesSmallDict (smallDictt *self, char* key);
+#define cropElemSmallDoubleO(self, index) (self)->f->cropElemSmallDouble(self, index)
+#define cropElemSmallDoubleG cropElemSmallDoubleO
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+smallDoublet* cropElemSmallDoubleSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+smallDoublet* cropElemSmallDoubleSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
-#define indexOfBoolO(self, value) (self)->f->indexOfBool(self, value)
-#define indexOfBoolG indexOfBoolO
+smallDoublet* cropElemSmallDoubleSmallDict (smallDictt *self, char* key);
+#define cropElemSmallIntO(self, index) (self)->f->cropElemSmallInt(self, index)
+#define cropElemSmallIntG cropElemSmallIntO
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfBoolSmallArray (smallArrayt *self, bool value);
+smallIntt* cropElemSmallIntSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfBoolSmallArray (smallArrayt *self, bool value);
+smallIntt* cropElemSmallIntSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfBoolSmallJson (smallJsont *self, bool value);
+smallIntt* cropElemSmallIntSmallDict (smallDictt *self, char* key);
+#define cropElemSmallJsonO(self, index) (self)->f->cropElemSmallJson(self, index)
+#define cropElemSmallJsonG cropElemSmallJsonO
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfBoolSmallJson (smallJsont *self, bool value);
-#define indexOfDoubleO(self, value) (self)->f->indexOfDouble(self, value)
-#define indexOfDoubleG indexOfDoubleO
+smallJsont* cropElemSmallJsonSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfDoubleSmallArray (smallArrayt *self, double value);
+smallJsont* cropElemSmallJsonSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfDoubleSmallArray (smallArrayt *self, double value);
+smallJsont* cropElemSmallJsonSmallDict (smallDictt *self, char* key);
+#define cropElemVoidO(self, index) (self)->f->cropElemVoid(self, index)
+#define cropElemVoidG cropElemVoidO
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfDoubleSmallJson (smallJsont *self, double value);
+void* cropElemVoidSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfDoubleSmallJson (smallJsont *self, double value);
-#define indexOfIntO(self, value) (self)->f->indexOfInt(self, value)
-#define indexOfIntG indexOfIntO
+void* cropElemVoidSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfIntSmallArray (smallArrayt *self, int64_t value);
+void* cropElemVoidSmallDict (smallDictt *self, char* key);
+#define cropElemSmallContainerO(self, index) (self)->f->cropElemSmallContainer(self, index)
+#define cropElemSmallContainerG cropElemSmallContainerO
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfIntSmallArray (smallArrayt *self, int64_t value);
+smallContainert* cropElemSmallContainerSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value
+ * index must be in the list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-ssize_t indexOfIntSmallJson (smallJsont *self, int64_t value);
+smallContainert* cropElemSmallContainerSmallArray (smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * value
+ * key must exist in the dictionary
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-ssize_t indexOfIntSmallJson (smallJsont *self, int64_t value);
-#define indexOfSO(self, string) (self)->f->indexOfS(self, string)
-#define indexOfSG indexOfSO
+smallContainert* cropElemSmallContainerSmallDict (smallDictt *self, char* key);
+#define injectUndefinedO(self, index) (self)->f->injectUndefined(self, index)
+#define injectUndefinedG injectUndefinedO
/*
- * return index of object in list
+ * inject an element in self at index
*
- * \param
- * value
- * \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
- */
-ssize_t indexOfSSmallArray (smallArrayt *self, const char *string);
-/*
- * return index of object in list
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSSmallArray (smallArrayt *self, const char *string);
+smallArrayt* injectUndefinedSmallArray(smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSSmallJson (smallJsont *self, const char *string);
+smallArrayt* injectUndefinedSmallArray(smallArrayt *self, intmax_t index);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSSmallJson (smallJsont *self, const char *string);
-#define indexOfCharO(self, c) (self)->f->indexOfChar(self, c)
-#define indexOfCharG indexOfCharO
+smallJsont* injectUndefinedSmallJson(smallJsont *self, intmax_t index);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfCharSmallArray (smallArrayt *self, char c);
+smallJsont* injectUndefinedSmallJson(smallJsont *self, intmax_t index);
+#define injectBoolO(self, index, toInject) (self)->f->injectBool(self, index, toInject)
+#define injectBoolG injectBoolO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfCharSmallArray (smallArrayt *self, char c);
+smallArrayt* injectBoolSmallArray (smallArrayt *self, intmax_t index, bool toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfCharSmallJson (smallJsont *self, char c);
+smallArrayt* injectBoolSmallArray (smallArrayt *self, intmax_t index, bool toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfCharSmallJson (smallJsont *self, char c);
+smallJsont* injectBoolSmallJson (smallJsont *self, intmax_t index, bool toInject);
/*
- * indexOf SmallString
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * needle: smallString to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of first occurence of needle in smallString
- * -1 when needle is not found
- * -1 when smallString or needle are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfCharSmallString (smallStringt *self, char c);
-#define indexOfDictO(self, dict) (self)->f->indexOfDict(self, dict)
-#define indexOfDictG indexOfDictO
+smallJsont* injectBoolSmallJson (smallJsont *self, intmax_t index, bool toInject);
+#define injectDoubleO(self, index, toInject) (self)->f->injectDouble(self, index, toInject)
+#define injectDoubleG injectDoubleO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallArrayt* injectDoubleSmallArray (smallArrayt *self, intmax_t index, double toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallArrayt* injectDoubleSmallArray (smallArrayt *self, intmax_t index, double toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfDictSmallJson (smallJsont *self, smallDictt *dict);
+smallJsont* injectDoubleSmallJson (smallJsont *self, intmax_t index, double toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfDictSmallJson (smallJsont *self, smallDictt *dict);
-#define indexOfArrayO(self, array) (self)->f->indexOfArray(self, array)
-#define indexOfArrayG indexOfArrayO
+smallJsont* injectDoubleSmallJson (smallJsont *self, intmax_t index, double toInject);
+#define injectIntO(self, index, toInject) (self)->f->injectInt(self, index, toInject)
+#define injectIntG injectIntO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallArrayt* injectIntSmallArray (smallArrayt *self, intmax_t index, int64_t toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallArrayt* injectIntSmallArray (smallArrayt *self, intmax_t index, int64_t toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraySmallJson (smallJsont *self, smallArrayt *array);
+smallJsont* injectIntSmallJson (smallJsont *self, intmax_t index, int64_t toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraySmallJson (smallJsont *self, smallArrayt *array);
-#define indexOfArraycO(self, array) (self)->f->indexOfArrayc(self, array)
-#define indexOfArraycG indexOfArraycO
+smallJsont* injectIntSmallJson (smallJsont *self, intmax_t index, int64_t toInject);
+#define injectSO(self, index, toInject) (self)->f->injectS(self, index, toInject)
+#define injectSG injectSO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraycSmallArray (smallArrayt *self, char **array);
+smallArrayt* injectSSmallArray (smallArrayt *self, intmax_t index, const char *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraycSmallArray (smallArrayt *self, char **array);
+smallArrayt* injectSSmallArray (smallArrayt *self, intmax_t index, const char *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraycSmallJson (smallJsont *self, char **array);
+smallJsont* injectSSmallJson (smallJsont *self, intmax_t index, const char *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfArraycSmallJson (smallJsont *self, char **array);
-#define indexOfSmallBoolO(self, value) (self)->f->indexOfSmallBool(self, value)
-#define indexOfSmallBoolG indexOfSmallBoolO
+smallJsont* injectSSmallJson (smallJsont *self, intmax_t index, const char *toInject);
+#define injectCharO(self, index, c) (self)->f->injectChar(self, index, c)
+#define injectCharG injectCharO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+smallArrayt* injectCharSmallArray (smallArrayt *self, intmax_t index, char c);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+smallArrayt* injectCharSmallArray (smallArrayt *self, intmax_t index, char c);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+smallJsont* injectCharSmallJson (smallJsont *self, intmax_t index, char c);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define indexOfSmallBytesO(self, value) (self)->f->indexOfSmallBytes(self, value)
-#define indexOfSmallBytesG indexOfSmallBytesO
+smallJsont* injectCharSmallJson (smallJsont *self, intmax_t index, char c);
+#define injectDictO(self, index, toInject) (self)->f->injectDict(self, index, toInject)
+#define injectDictG injectDictO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+smallArrayt* injectDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+smallArrayt* injectDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+smallJsont* injectDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define indexOfSmallDoubleO(self, value) (self)->f->indexOfSmallDouble(self, value)
-#define indexOfSmallDoubleG indexOfSmallDoubleO
+smallJsont* injectDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
+#define injectArrayO(self, index, toInject) (self)->f->injectArray(self, index, toInject)
+#define injectArrayG injectArrayO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
- */
-ssize_t indexOfSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+smallArrayt* injectArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+smallJsont* injectArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define indexOfSmallIntO(self, value) (self)->f->indexOfSmallInt(self, value)
-#define indexOfSmallIntG indexOfSmallIntO
+smallJsont* injectArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
+#define injectArraycO(self, index, toInject) (self)->f->injectArrayc(self, index, toInject)
+#define injectArraycG injectArraycO
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallArrayt* injectArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+smallArrayt* injectArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallIntSmallJson (smallJsont *self, smallIntt *value);
+smallJsont* injectArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
/*
- * return index of object in list
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value
+ * index in array
+ * \param
+ * toInject element
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-ssize_t indexOfSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define binarySearchUndefinedO(self, undefined) (self)->f->binarySearchUndefined(self, undefined)
-#define binarySearchUndefinedG binarySearchUndefinedO
+smallJsont* injectArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
+#define injectSmallBoolO(self, index, toInject) (self)->f->injectSmallBool(self, index, toInject)
+#define injectSmallBoolG injectSmallBoolO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
*
- * \param
- * value to search
- * \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
-/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
-#define binarySearchBoolO(self, value) (self)->f->binarySearchBool(self, value)
-#define binarySearchBoolG binarySearchBoolO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchBoolSmallArray (smallArrayt *self, bool value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
+#define injectSmallBytesO(self, index, toInject) (self)->f->injectSmallBytes(self, index, toInject)
+#define injectSmallBytesG injectSmallBytesO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchBoolSmallArray (smallArrayt *self, bool value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchBoolSmallJson (smallJsont *self, bool value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchBoolSmallJson (smallJsont *self, bool value);
-#define binarySearchDoubleO(self, value) (self)->f->binarySearchDouble(self, value)
-#define binarySearchDoubleG binarySearchDoubleO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDoubleSmallArray (smallArrayt *self, double value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
+#define injectSmallDoubleO(self, index, toInject) (self)->f->injectSmallDouble(self, index, toInject)
+#define injectSmallDoubleG injectSmallDoubleO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDoubleSmallArray (smallArrayt *self, double value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDoubleSmallJson (smallJsont *self, double value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDoubleSmallJson (smallJsont *self, double value);
-#define binarySearchIntO(self, value) (self)->f->binarySearchInt(self, value)
-#define binarySearchIntG binarySearchIntO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchIntSmallArray (smallArrayt *self, int64_t value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
+#define injectSmallIntO(self, index, toInject) (self)->f->injectSmallInt(self, index, toInject)
+#define injectSmallIntG injectSmallIntO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchIntSmallArray (smallArrayt *self, int64_t value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchIntSmallJson (smallJsont *self, int64_t value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchIntSmallJson (smallJsont *self, int64_t value);
-#define binarySearchSO(self, string) (self)->f->binarySearchS(self, string)
-#define binarySearchSG binarySearchSO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSSmallArray (smallArrayt *self, const char *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
+#define injectSmallContainerO(self, index, toInject) (self)->f->injectSmallContainer(self, index, toInject)
+#define injectSmallContainerG injectSmallContainerO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSSmallArray (smallArrayt *self, const char *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSSmallJson (smallJsont *self, const char *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSSmallJson (smallJsont *self, const char *string);
-#define binarySearchCharO(self, c) (self)->f->binarySearchChar(self, c)
-#define binarySearchCharG binarySearchCharO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
*
- * \param
- * value to search
- * \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchCharSmallArray (smallArrayt *self, char c);
-/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchCharSmallArray (smallArrayt *self, char c);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
+#define injectNFreeUndefinedO(self, index, undefined) (self)->f->injectNFreeUndefined(self, index, undefined)
+#define injectNFreeUndefinedG injectNFreeUndefinedO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchCharSmallJson (smallJsont *self, char c);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchCharSmallJson (smallJsont *self, char c);
-#define binarySearchDictO(self, dict) (self)->f->binarySearchDict(self, dict)
-#define binarySearchDictG binarySearchDictO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeUndefinedSmallJson(smallJsont *self, intmax_t index, undefinedt *undefined);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeUndefinedSmallJson(smallJsont *self, intmax_t index, undefinedt *undefined);
+#define injectNFreeSO(self, index, toInject) (self)->f->injectNFreeS(self, index, toInject)
+#define injectNFreeSG injectNFreeSO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSSmallArray (smallArrayt *self, intmax_t index, char *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
-#define binarySearchArrayO(self, array) (self)->f->binarySearchArray(self, array)
-#define binarySearchArrayG binarySearchArrayO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSSmallArray (smallArrayt *self, intmax_t index, char *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSSmallJson (smallJsont *self, intmax_t index, char *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSSmallJson (smallJsont *self, intmax_t index, char *toInject);
+#define injectNFreeDictO(self, index, toInject) (self)->f->injectNFreeDict(self, index, toInject)
+#define injectNFreeDictG injectNFreeDictO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
-#define binarySearchArraycO(self, array) (self)->f->binarySearchArrayc(self, array)
-#define binarySearchArraycG binarySearchArraycO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeDictSmallArray (smallArrayt *self, intmax_t index, smallDictt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraycSmallArray (smallArrayt *self, char **array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraycSmallArray (smallArrayt *self, char **array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeDictSmallJson (smallJsont *self, intmax_t index, smallDictt *toInject);
+#define injectNFreeArrayO(self, index, toInject) (self)->f->injectNFreeArray(self, index, toInject)
+#define injectNFreeArrayG injectNFreeArrayO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraycSmallJson (smallJsont *self, char **array);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchArraycSmallJson (smallJsont *self, char **array);
-#define binarySearchSmallBoolO(self, value) (self)->f->binarySearchSmallBool(self, value)
-#define binarySearchSmallBoolG binarySearchSmallBoolO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeArraySmallArray (smallArrayt *self, intmax_t index, smallArrayt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeArraySmallJson (smallJsont *self, intmax_t index, smallArrayt *toInject);
+#define injectNFreeArraycO(self, index, toInject) (self)->f->injectNFreeArrayc(self, index, toInject)
+#define injectNFreeArraycG injectNFreeArraycO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define binarySearchSmallBytesO(self, value) (self)->f->binarySearchSmallBytes(self, value)
-#define binarySearchSmallBytesG binarySearchSmallBytesO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **toInject);
+#define injectNFreeSmallBoolO(self, index, toInject) (self)->f->injectNFreeSmallBool(self, index, toInject)
+#define injectNFreeSmallBoolG injectNFreeSmallBoolO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define binarySearchSmallDoubleO(self, value) (self)->f->binarySearchSmallDouble(self, value)
-#define binarySearchSmallDoubleG binarySearchSmallDoubleO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallBoolSmallArray (smallArrayt *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallBoolSmallJson (smallJsont *self, intmax_t index, smallBoolt *toInject);
+#define injectNFreeSmallBytesO(self, index, toInject) (self)->f->injectNFreeSmallBytes(self, index, toInject)
+#define injectNFreeSmallBytesG injectNFreeSmallBytesO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define binarySearchSmallIntO(self, value) (self)->f->binarySearchSmallInt(self, value)
-#define binarySearchSmallIntG binarySearchSmallIntO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *toInject);
+#define injectNFreeSmallDoubleO(self, index, toInject) (self)->f->injectNFreeSmallDouble(self, index, toInject)
+#define injectNFreeSmallDoubleG injectNFreeSmallDoubleO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallIntSmallJson (smallJsont *self, smallIntt *value);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define binarySearchSmallStringO(self, string) (self)->f->binarySearchSmallString(self, string)
-#define binarySearchSmallStringG binarySearchSmallStringO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallDoubleSmallArray (smallArrayt *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallJsont* injectNFreeSmallDoubleSmallJson (smallJsont *self, intmax_t index, smallDoublet *toInject);
+#define injectNFreeSmallIntO(self, index, toInject) (self)->f->injectNFreeSmallInt(self, index, toInject)
+#define injectNFreeSmallIntG injectNFreeSmallIntO
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
/*
- * efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * value to search
+ * index in array
+ * \param
+ * toInject element
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t binarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
-#define icHasSO(self, string) (self)->f->icHasS(self, string)
-#define icHasSG icHasSO
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
+ */
+smallArrayt* injectNFreeSmallIntSmallArray (smallArrayt *self, intmax_t index, smallIntt *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasSSmallArray (smallArrayt *self, const char *string);
+smallJsont* injectNFreeSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasSSmallArray (smallArrayt *self, const char *string);
+smallJsont* injectNFreeSmallIntSmallJson (smallJsont *self, intmax_t index, smallIntt *toInject);
+#define injectNFreeSmallStringO(self, index, toInject) (self)->f->injectNFreeSmallString(self, index, toInject)
+#define injectNFreeSmallStringG injectNFreeSmallStringO
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasSSmallJson (smallJsont *self, const char *string);
+smallArrayt* injectNFreeSmallStringSmallArray (smallArrayt *self, intmax_t index, smallStringt *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasSSmallJson (smallJsont *self, const char *string);
-#define icHasCharO(self, c) (self)->f->icHasChar(self, c)
-#define icHasCharG icHasCharO
+smallArrayt* injectNFreeSmallStringSmallArray (smallArrayt *self, intmax_t index, smallStringt *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasCharSmallArray (smallArrayt *self, char c);
+smallJsont* injectNFreeSmallStringSmallJson (smallJsont *self, intmax_t index, smallStringt *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasCharSmallArray (smallArrayt *self, char c);
+smallJsont* injectNFreeSmallStringSmallJson (smallJsont *self, intmax_t index, smallStringt *toInject);
+#define injectNFreeSmallContainerO(self, index, toInject) (self)->f->injectNFreeSmallContainer(self, index, toInject)
+#define injectNFreeSmallContainerG injectNFreeSmallContainerO
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasCharSmallJson (smallJsont *self, char c);
+smallArrayt* injectNFreeSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasCharSmallJson (smallJsont *self, char c);
+smallArrayt* injectNFreeSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject);
/*
- * ignore case has SmallString
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * needle: smallString to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * pointer to first occurence of needle in smallString
- * NULL when needle is not found
- * NULL when smallString or needle are NULL
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-char* icHasCharSmallString (smallStringt *self, char c);
-#define icHasDictO(self, dict) (self)->f->icHasDict(self, dict)
-#define icHasDictG icHasDictO
+smallJsont* injectNFreeSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
/*
- * ignore case and check if self has object
+ * inject an element in self at index
+ *
+ * return array with toInject at index
+ * negative indexes are allowed
*
* \param
- * object to find
+ * index in array
+ * \param
+ * toInject element
* \return
- * true when the object is found
+ * array
+ * unchanged array when array is NULL or invalid index
+ * NULL error
*/
-bool icHasDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallJsont* injectNFreeSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject);
+#define sortFO(self, compareFunction) (self)->f->sortF(self, compareFunction)
+#define sortFG sortFO
/*
- * ignore case and check if self has object
+ * sort self according to the results from the compareFunction function
+ *
+ * shCmpt is defined in libsheepy.h
+ * typedef int (*shCmp)(const void * a, const void * b);
+ *
+ * a and b are baset objects, cast to the correct class by using the object type
+ *
+ * cast macros: castS(s, S) and cast(smallArrayt*, a, A)
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * sorted list
+ * NULL error
*/
-bool icHasDictSmallArray (smallArrayt *self, smallDictt *dict);
+smallArrayt* sortFSmallArray (smallArrayt *self, shCmpt compareFunction);
/*
- * ignore case and check if self has object
+ * sort self according to the results from the compareFunction function
+ *
+ * shCmpt is defined in libsheepy.h
+ * typedef int (*shCmp)(const void * a, const void * b);
+ *
+ * a and b are baset objects, cast to the correct class by using the object type
+ *
+ * cast macros: castS(s, S) and cast(smallArrayt*, a, A)
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * sorted list
+ * NULL error
*/
-bool icHasDictSmallJson (smallJsont *self, smallDictt *dict);
+smallArrayt* sortFSmallArray (smallArrayt *self, shCmpt compareFunction);
/*
- * ignore case and check if self has object
+ * sort self according to the results from the compareFunction function
+ *
+ * shCmpt is defined in libsheepy.h
+ * typedef int (*shCmp)(const void * a, const void * b);
+ *
+ * a and b are baset objects, cast to the correct class by using the object type
+ *
+ * cast macros: castS(s, S) and cast(smallJsont*, a, A)
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * sorted list
+ * NULL error
*/
-bool icHasDictSmallJson (smallJsont *self, smallDictt *dict);
-#define icHasArrayO(self, array) (self)->f->icHasArray(self, array)
-#define icHasArrayG icHasArrayO
+smallJsont* sortFSmallJson (smallJsont *self, shCmpt compareFunction);
/*
- * ignore case and check if self has object
+ * sort self according to the results from the compareFunction function
+ *
+ * shCmpt is defined in libsheepy.h
+ * typedef int (*shCmp)(const void * a, const void * b);
+ *
+ * a and b are baset objects, cast to the correct class by using the object type
+ *
+ * cast macros: castS(s, S) and cast(smallJsont*, a, A)
*
- * \param
- * object to find
* \return
- * true when the object is found
+ * sorted list
+ * NULL error
*/
-bool icHasArraySmallArray (smallArrayt *self, smallArrayt *array);
+smallJsont* sortFSmallJson (smallJsont *self, shCmpt compareFunction);
+#define equalO(self, array) (self)->f->equal(self, array)
+#define equalG equalO
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraySmallArray (smallArrayt *self, smallArrayt *array);
+bool equalSmallArray (smallArrayt *self, smallArrayt *array);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraySmallJson (smallJsont *self, smallArrayt *array);
+bool equalSmallArraySmallJson(smallArrayt *self, smallJsont *array);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraySmallJson (smallJsont *self, smallArrayt *array);
-#define icHasArraycO(self, array) (self)->f->icHasArrayc(self, array)
-#define icHasArraycG icHasArraycO
+bool equalSmallArrayArray (smallArrayt* self, char ** p2);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraycSmallArray (smallArrayt *self, char **array);
+bool equalSmallArrayBase (smallArrayt* self, baset* p2);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraycSmallArray (smallArrayt *self, char **array);
+bool equalSmallArray (smallArrayt *self, smallArrayt *array);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraycSmallJson (smallJsont *self, char **array);
+bool equalSmallArraySmallJson(smallArrayt *self, smallJsont *array);
/*
- * ignore case and check if self has object
+ * compare each element of self and list
*
* \param
- * object to find
+ * list
* \return
- * true when the object is found
+ * true the lists have identical elements
+ * false they differ
*/
-bool icHasArraycSmallJson (smallJsont *self, char **array);
-#define icIndexOfSO(self, string) (self)->f->icIndexOfS(self, string)
-#define icIndexOfSG icIndexOfSO
+bool equalSmallArrayArray (smallArrayt* self, char ** p2);
/*
- * ignore case and return index of object in list
+ * compare each element of self and list
*
* \param
- * value
+ * list
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
- */
-ssize_t icIndexOfSSmallArray (smallArrayt *self, const char *string);
+ * true the lists have identical elements
+ * false they differ
+ */
+bool equalSmallArrayBase (smallArrayt* self, baset* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfSSmallArray (smallArrayt *self, const char *string);
+bool equalSmallBoolChar(smallBoolt* self, const char * p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfSSmallJson (smallJsont *self, const char *string);
+bool equalSmallBoolBase(smallBoolt* self, baset* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfSSmallJson (smallJsont *self, const char *string);
-#define icIndexOfCharO(self, c) (self)->f->icIndexOfChar(self, c)
-#define icIndexOfCharG icIndexOfCharO
+bool equalSmallBoolBool(smallBoolt* self, bool p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfCharSmallArray (smallArrayt *self, char c);
+bool equalSmallBoolDouble(smallBoolt* self, double p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfCharSmallArray (smallArrayt *self, char c);
+bool equalSmallBoolInt64(smallBoolt* self, int64_t p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfCharSmallJson (smallJsont *self, char c);
+bool equalSmallBoolInt32(smallBoolt* self, int32_t p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfCharSmallJson (smallJsont *self, char c);
+bool equalSmallBoolUint32(smallBoolt* self, uint32_t p2);
/*
- * ignore case indexOf SmallString
+ * get a pointer to smallBool
*
- * \param
- * needle: smallString to find
* \return
- * index of first occurence of needle in smallString
- * -1 when needle is not found
- * -1 when smallString or needle are NULL
+ * char*
*/
-ssize_t icIndexOfCharSmallString (smallStringt *self, char c);
-#define icIndexOfDictO(self, dict) (self)->f->icIndexOfDict(self, dict)
-#define icIndexOfDictG icIndexOfDictO
+bool equalSmallBoolUint64(smallBoolt* self, uint64_t p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+bool equalSmallBool(smallBoolt* self, smallBoolt* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+bool equalSmallBoolSmallDouble(smallBoolt* self, smallDoublet* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfDictSmallJson (smallJsont *self, smallDictt *dict);
+bool equalSmallBoolSmallInt(smallBoolt* self, smallIntt* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfDictSmallJson (smallJsont *self, smallDictt *dict);
-#define icIndexOfArrayO(self, array) (self)->f->icIndexOfArray(self, array)
-#define icIndexOfArrayG icIndexOfArrayO
+bool equalSmallBoolSmallJson(smallBoolt* self, smallJsont* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+bool equalSmallBoolSmallString(smallBoolt* self, smallStringt* p2);
/*
- * ignore case and return index of object in list
+ * get a pointer to smallBool
*
- * \param
- * value
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * char*
*/
-ssize_t icIndexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+bool equalSmallBoolSmallBytes(smallBoolt* self, smallBytest* p2);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraySmallJson (smallJsont *self, smallArrayt *array);
+bool equalSmallBytes(smallBytest *self, smallBytest *value);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraySmallJson (smallJsont *self, smallArrayt *array);
-#define icIndexOfArraycO(self, array) (self)->f->icIndexOfArrayc(self, array)
-#define icIndexOfArraycG icIndexOfArraycO
+bool equalSmallBytesBool(smallBytest *self, bool value);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraycSmallArray (smallArrayt *self, char **array);
+bool equalSmallBytesDouble(smallBytest *self, double value);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraycSmallArray (smallArrayt *self, char **array);
+bool equalSmallBytesInt64(smallBytest *self, int64_t value);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraycSmallJson (smallJsont *self, char **array);
+bool equalSmallBytesInt32(smallBytest *self, int32_t value);
/*
- * ignore case and return index of object in list
+ * equal
+ * compare self to value
*
* \param
- * value
+ * value to compare
* \return
- * index
- * -1 when the value is not found
- * -1 when array or value are NULL
+ * true self and value have identical content
+ * false they differ
*/
-ssize_t icIndexOfArraycSmallJson (smallJsont *self, char **array);
-#define icBinarySearchSO(self, string) (self)->f->icBinarySearchS(self, string)
-#define icBinarySearchSG icBinarySearchSO
+bool equalSmallBytesUint32(smallBytest *self, uint32_t value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSSmallArray (smallArrayt *self, const char *string);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesUint64(smallBytest *self, uint64_t value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSSmallArray (smallArrayt *self, const char *string);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesSmallBool(smallBytest *self, smallBoolt *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSSmallJson (smallJsont *self, const char *string);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesSmallDouble(smallBytest *self, smallDoublet *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSSmallJson (smallJsont *self, const char *string);
-#define icBinarySearchCharO(self, c) (self)->f->icBinarySearchChar(self, c)
-#define icBinarySearchCharG icBinarySearchCharO
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesSmallInt(smallBytest *self, smallIntt *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchCharSmallArray (smallArrayt *self, char c);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesChar(smallBytest *self, const char *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchCharSmallArray (smallArrayt *self, char c);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesSmallString(smallBytest *self, smallStringt *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * equal
+ * compare self to value
*
* \param
- * value to search
+ * value to compare
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchCharSmallJson (smallJsont *self, char c);
+ * true self and value have identical content
+ * false they differ
+ */
+bool equalSmallBytesBase(smallBytest *self, baset *value);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * add merge - already existing values are kept
+ */
+bool equalSmallDictBase (smallDictt* self, baset* p2);
+/*
+ * add merge - already existing values are kept
+ */
+bool equalSmallDictSmallJson (smallDictt* self, smallJsont* p2);
+/*
+ * add merge - already existing values are kept
+ */
+bool equalSmallDict (smallDictt* self, smallDictt* p2);
+/*
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchCharSmallJson (smallJsont *self, char c);
-#define icBinarySearchDictO(self, dict) (self)->f->icBinarySearchDict(self, dict)
-#define icBinarySearchDictG icBinarySearchDictO
+ * double*
+ */
+bool equalSmallDoubleCha(smallDoublet* self, char p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+ * double*
+ */
+bool equalSmallDoubleChar(smallDoublet* self, const char * p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+ * double*
+ */
+bool equalSmallDoubleBase(smallDoublet* self, baset* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+ * double*
+ */
+bool equalSmallDoubleBool(smallDoublet* self, bool p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
-#define icBinarySearchArrayO(self, array) (self)->f->icBinarySearchArray(self, array)
-#define icBinarySearchArrayG icBinarySearchArrayO
+ * double*
+ */
+bool equalSmallDoubleDouble(smallDoublet* self, double p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+ * double*
+ */
+bool equalSmallDoubleInt64(smallDoublet* self, int64_t p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+ * double*
+ */
+bool equalSmallDoubleInt32(smallDoublet* self, int32_t p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+ * double*
+ */
+bool equalSmallDoubleUint32(smallDoublet* self, uint32_t p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
-#define icBinarySearchArraycO(self, array) (self)->f->icBinarySearchArrayc(self, array)
-#define icBinarySearchArraycG icBinarySearchArraycO
+ * double*
+ */
+bool equalSmallDoubleUint64(smallDoublet* self, uint64_t p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraycSmallArray (smallArrayt *self, char **array);
+ * double*
+ */
+bool equalSmallDoubleSmallBool(smallDoublet* self, smallBoolt* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraycSmallArray (smallArrayt *self, char **array);
+ * double*
+ */
+bool equalSmallDoubleSmallBytes(smallDoublet* self, smallBytest* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraycSmallJson (smallJsont *self, char **array);
+ * double*
+ */
+bool equalSmallDouble(smallDoublet* self, smallDoublet* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchArraycSmallJson (smallJsont *self, char **array);
-#define icBinarySearchSmallStringO(self, string) (self)->f->icBinarySearchSmallString(self, string)
-#define icBinarySearchSmallStringG icBinarySearchSmallStringO
+ * double*
+ */
+bool equalSmallDoubleSmallInt(smallDoublet* self, smallIntt* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSmallStringSmallArray(smallArrayt *self, smallStringt *string);
+ * double*
+ */
+bool equalSmallDoubleSmallJson(smallDoublet* self, smallJsont* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to double
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSmallStringSmallArray(smallArrayt *self, smallStringt *string);
+ * double*
+ */
+bool equalSmallDoubleSmallString(smallDoublet* self, smallStringt* p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to int
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+ * int
+ */
+bool equalSmallIntCha (smallIntt* self, char p2);
/*
- * ignore case and efficiently finds the index of object in list
- * the list has be sorted with the sort function
+ * get a pointer to int
*
- * \param
- * value to search
* \return
- * index of value
- * -1 value not found or NULL input pointers
- */
-ssize_t icBinarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
-#define forEachO(self, closure, funcElem) (self)->f->forEach(self, closure, funcElem)
-#define forEachG forEachO
-/*
- * for each loop on elements in the Array
- *
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * int
*/
-void forEachSmallArray (smallArrayt *self, void *closure, forEachElementSmallArrayFt funcElem);
+bool equalSmallIntChar (smallIntt* self, const char * p2);
/*
- * for each loop on elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void forEachSmallArray (smallArrayt *self, void *closure, forEachElementSmallArrayFt funcElem);
+bool equalSmallIntBase (smallIntt* self, baset* p2);
/*
- * for each loop on elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void forEachSmallJson (smallJsont *self, void *closure, forEachElementSmallJsonFt funcElem);
+bool equalSmallIntBool (smallIntt* self, bool p2);
/*
- * for each loop on elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void forEachSmallJson (smallJsont *self, void *closure, forEachElementSmallJsonFt funcElem);
-#define enumerateO(self, closure, funcElem) (self)->f->enumerate(self, closure, funcElem)
-#define enumerateG enumerateO
+bool equalSmallIntDouble (smallIntt* self, double p2);
/*
- * enumerate elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void enumerateSmallArray (smallArrayt *self, void *closure, enumerateElementSmallArrayFt funcElem);
+bool equalSmallIntInt64 (smallIntt* self, int64_t p2);
/*
- * enumerate elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void enumerateSmallArray (smallArrayt *self, void *closure, enumerateElementSmallArrayFt funcElem);
+bool equalSmallIntInt32 (smallIntt* self, int32_t p2);
/*
- * enumerate elements in the dictionary
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void enumerateSmallDict (smallDictt *self, void *closure, enumerateElementSmallDictFt funcElem);
+bool equalSmallIntUint32 (smallIntt* self, uint32_t p2);
/*
- * enumerate elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void enumerateSmallJson (smallJsont *self, void *closure, enumerateElementSmallJsonFt funcElem);
+bool equalSmallIntUint64 (smallIntt* self, uint64_t p2);
/*
- * enumerate elements in the Array
+ * get a pointer to int
*
- * \param
- * closure user defined pointer
- * \param
- * funcElem user defined function call on each element
+ * \return
+ * int
*/
-void enumerateSmallJson (smallJsont *self, void *closure, enumerateElementSmallJsonFt funcElem);
-#define iterStartO(self) (self)->f->iterStart(self)
-#define iterStartG iterStartO
+bool equalSmallIntSmallBool (smallIntt* self, smallBoolt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * get a pointer to int
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \return
+ * int
*/
-baset* iterStartSmallArray (smallArrayt *self);
+bool equalSmallIntSmallBytes (smallIntt* self, smallBytest* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * get a pointer to int
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \return
+ * int
*/
-baset* iterStartSmallArray (smallArrayt *self);
+bool equalSmallIntSmallDouble(smallIntt* self, smallDoublet* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * get a pointer to int
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * \return
+ * int
*/
-baset* iterStartSmallDict (smallDictt *self);
+bool equalSmallInt (smallIntt* self, smallIntt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * get a pointer to int
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \return
+ * int
*/
-baset* iterStartSmallJson (smallJsont *self);
+bool equalSmallIntSmallJson (smallIntt* self, smallJsont* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * get a pointer to int
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \return
+ * int
*/
-baset* iterStartSmallJson (smallJsont *self);
-#define iterStartLastO(self) (self)->f->iterStartLast(self)
-#define iterStartLastG iterStartLastO
+bool equalSmallIntSmallString(smallIntt* self, smallStringt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartLastSmallArray (smallArrayt *self);
+bool equalSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartLastSmallArray (smallArrayt *self);
+bool equalSmallJsonArray (smallJsont *self, char ** p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartLastSmallJson (smallJsont *self);
+bool equalSmallJsonBase (smallJsont *self, baset* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartLastSmallJson (smallJsont *self);
-#define iterStartFromO(self, index) (self)->f->iterStartFrom(self, index)
-#define iterStartFromG iterStartFromO
+bool equalSmallJsonCha (smallJsont* self, char p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromSmallArray (smallArrayt *self, intmax_t index);
+bool equalSmallJsonChar (smallJsont* self, const char * p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromSmallArray (smallArrayt *self, intmax_t index);
+bool equalSmallJsonBool (smallJsont* self, bool p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromSmallJson (smallJsont *self, intmax_t index);
+bool equalSmallJsonDouble (smallJsont* self, double p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromSmallJson (smallJsont *self, intmax_t index);
-#define iterStartFromStepO(self, index, step) (self)->f->iterStartFromStep(self, index, step)
-#define iterStartFromStepG iterStartFromStepO
+bool equalSmallJsonInt64 (smallJsont* self, int64_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromStepSmallArray (smallArrayt *self, intmax_t index, intmax_t step);
+bool equalSmallJsonInt32 (smallJsont* self, int32_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromStepSmallArray (smallArrayt *self, intmax_t index, intmax_t step);
+bool equalSmallJsonUint32 (smallJsont* self, uint32_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromStepSmallJson(smallJsont *self, intmax_t index, intmax_t step);
+bool equalSmallJsonUint64 (smallJsont* self, uint64_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterStartFromStepSmallJson(smallJsont *self, intmax_t index, intmax_t step);
-#define iterNextO(self) (self)->f->iterNext(self)
-#define iterNextG iterNextO
+bool equalSmallJsonSmallBool (smallJsont* self, smallBoolt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterNextSmallArray (smallArrayt *self);
+bool equalSmallJsonSmallBytes (smallJsont* self, smallBytest* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterNextSmallArray (smallArrayt *self);
+bool equalSmallJsonSmallDouble (smallJsont* self, smallDoublet* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * compare each element of self and list
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterNextSmallDict (smallDictt *self);
+bool equalSmallJsonSmallInt (smallJsont* self, smallIntt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterNextSmallJson (smallJsont *self);
+bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
/*
- * iterator
+ * compare each element of self and list
*
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
- *
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterNextSmallJson (smallJsont *self);
-#define iterElementO(self) (self)->f->iterElement(self)
-#define iterElementG iterElementO
+bool equalSmallJsonSmallString (smallJsont* self, smallStringt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterElementSmallArray (smallArrayt *self);
+bool equalSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterElementSmallArray (smallArrayt *self);
+bool equalSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * compare each element of self and list
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterElementSmallDict (smallDictt *self);
+bool equalSmallJsonArray (smallJsont *self, char ** p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterElementSmallJson (smallJsont *self);
+bool equalSmallJsonBase (smallJsont *self, baset* p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-baset* iterElementSmallJson (smallJsont *self);
-#define iterIndexO(self) (self)->f->iterIndex(self)
-#define iterIndexG iterIndexO
+bool equalSmallJsonCha (smallJsont* self, char p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-ssize_t iterIndexSmallArray (smallArrayt *self);
+bool equalSmallJsonChar (smallJsont* self, const char * p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-ssize_t iterIndexSmallArray (smallArrayt *self);
+bool equalSmallJsonBool (smallJsont* self, bool p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-ssize_t iterIndexSmallJson (smallJsont *self);
+bool equalSmallJsonDouble (smallJsont* self, double p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-ssize_t iterIndexSmallJson (smallJsont *self);
-#define iterStepO(self) (self)->f->iterStep(self)
-#define iterStepG iterStepO
+bool equalSmallJsonInt64 (smallJsont* self, int64_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-intmax_t iterStepSmallArray (smallArrayt *self);
+bool equalSmallJsonInt32 (smallJsont* self, int32_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(array, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-intmax_t iterStepSmallArray (smallArrayt *self);
+bool equalSmallJsonUint32 (smallJsont* self, uint32_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-intmax_t iterStepSmallJson (smallJsont *self);
+bool equalSmallJsonUint64 (smallJsont* self, uint64_t p2);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * compare each element of self and list
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * list
+ * \return
+ * true the lists have identical elements
+ * false they differ
*/
-intmax_t iterStepSmallJson (smallJsont *self);
-#define joinCharO(self, c) (self)->f->joinChar(self, c)
-#define joinCharG joinCharO
+bool equalSmallJsonSmallBool (smallJsont* self, smallBoolt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinCharSmallArray (smallArrayt *self, char c);
+bool equalSmallJsonSmallBytes (smallJsont* self, smallBytest* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinCharSmallArray (smallArrayt *self, char c);
+bool equalSmallJsonSmallDouble (smallJsont* self, smallDoublet* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinCharSmallJson (smallJsont *self, char c);
+bool equalSmallJsonSmallInt (smallJsont* self, smallIntt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinCharSmallJson (smallJsont *self, char c);
-#define joinSmallStringO(self, delim) (self)->f->joinSmallString(self, delim)
-#define joinSmallStringG joinSmallStringO
+bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinSmallStringSmallArray(smallArrayt *self, smallStringt* delim);
+bool equalSmallJsonSmallString (smallJsont* self, smallStringt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallStringt* joinSmallStringSmallArray(smallArrayt *self, smallStringt* delim);
+bool equalSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-smallStringt* joinSmallStringSmallJson(smallJsont *self, smallStringt* delim);
+bool equalSmallString (smallStringt *self, smallStringt *string);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-smallStringt* joinSmallStringSmallJson(smallJsont *self, smallStringt* delim);
-#define joinCharSO(self, c) (self)->f->joinCharS(self, c)
-#define joinCharSG joinCharSO
+bool equalSmallStringBase (smallStringt* self, baset* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinCharSSmallArray (smallArrayt *self, char c);
+bool equalSmallStringBool (smallStringt* self, bool p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinCharSSmallArray (smallArrayt *self, char c);
+bool equalSmallStringDouble (smallStringt* self, double p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinCharSSmallJson (smallJsont *self, char c);
+bool equalSmallStringInt64 (smallStringt* self, int64_t p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinCharSSmallJson (smallJsont *self, char c);
-#define joinSmallJsonSO(self, delim) (self)->f->joinSmallJsonS(self, delim)
-#define joinSmallJsonSG joinSmallJsonSO
+bool equalSmallStringInt32 (smallStringt* self, int32_t p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallJsonSSmallArray (smallArrayt *self, smallJsont* delim);
+bool equalSmallStringUint32 (smallStringt* self, uint32_t p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallJsonSSmallArray (smallArrayt *self, smallJsont* delim);
+bool equalSmallStringUint64 (smallStringt* self, uint64_t p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallJsonSSmallJson (smallJsont *self, smallJsont* delim);
+bool equalSmallStringSmallBool(smallStringt* self, smallBoolt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallJsonSSmallJson (smallJsont *self, smallJsont* delim);
-#define joinSmallStringSO(self, delim) (self)->f->joinSmallStringS(self, delim)
-#define joinSmallStringSG joinSmallStringSO
+bool equalSmallStringSmallBytes(smallStringt* self, smallBytest* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallStringSSmallArray(smallArrayt *self, smallStringt* delim);
+bool equalSmallStringSmallDouble(smallStringt* self, smallDoublet* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallStringSSmallArray(smallArrayt *self, smallStringt* delim);
+bool equalSmallStringSmallInt(smallStringt* self, smallIntt* p2);
/*
- * join list, the elements are seperated with delim in the resulting string
+ * equal
+ * compare self to smallString
*
* \param
- * delim: string seperator
+ * smallString to compare
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the smallStrings have identical content
+ * false they differ
*/
-char* joinSmallStringSSmallJson(smallJsont *self, smallStringt* delim);
+bool equalSmallStringSmallJson(smallStringt* self, smallJsont* p2);
+#define equalSmallJsonO(self, array) (self)->f->equalSmallJson(self, array)
+#define equalSmallJsonG equalSmallJsonO
/*
- * join list, the elements are seperated with delim in the resulting string
+ * compare each element of self and list
*
* \param
- * delim: string seperator
+ * list
* \return
- * joined string
- * NULL when list or delim are NULL
+ * true the lists have identical elements
+ * false they differ
*/
-char* joinSmallStringSSmallJson(smallJsont *self, smallStringt* delim);
-#define zipSmallJsonSmallJsonO(self, array1, array2) (self)->f->zipSmallJsonSmallJson(self, array1, array2)
-#define zipSmallJsonSmallJsonG zipSmallJsonSmallJsonO
+bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
/*
- * zip arrays and store in array
+ * compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipSmallJsonSmallJsonSmallArray (smallArrayt *self, smallJsont *array1, smallJsont *array2);
+bool equalSmallJsonSmallJson (smallJsont* self, smallJsont* p2);
+#define equalArrayO(self, p2) (self)->f->equalArray(self, p2)
+#define equalArrayG equalArrayO
+#define equalBaseO(self, p2) (self)->f->equalBase(self, p2)
+#define equalBaseG equalBaseO
+#define icEqualO(self, array) (self)->f->icEqual(self, array)
+#define icEqualG icEqualO
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipSmallJsonSmallJsonSmallArray (smallArrayt *self, smallJsont *array1, smallJsont *array2);
+bool icEqualSmallArray (smallArrayt *self, smallArrayt *array);
/*
- * zip arrays and store in dictionary
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * 1 all the elements from keys and values are in the dictionary
- * 0 some elements from keys and values are in the dictionary or keys or values length is 0
- * -1 keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallDictt* zipSmallJsonSmallJsonSmallDict (smallDictt *self, smallJsont *keys, smallJsont *values);
-#define zipSmallJsonCharO(self, array1, array2) (self)->f->zipSmallJsonChar(self, array1, array2)
-#define zipSmallJsonCharG zipSmallJsonCharO
+bool icEqualSmallArraySmallJson(smallArrayt *self, smallJsont *array);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipSmallJsonCharSmallArray (smallArrayt *self, smallJsont *array1, char **array2);
+bool icEqualSmallArrayArray (smallArrayt* self, char ** p2);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipSmallJsonCharSmallArray (smallArrayt *self, smallJsont *array1, char **array2);
-#define zipArrayO(self, array1, array2) (self)->f->zipArray(self, array1, array2)
-#define zipArrayG zipArrayO
+bool icEqualSmallArrayBase (smallArrayt* self, baset* p2);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipArraySmallArray (smallArrayt *self, char** array1, smallArrayt *array2);
+bool icEqualSmallArray (smallArrayt *self, smallArrayt *array);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipArraySmallArray (smallArrayt *self, char** array1, smallArrayt *array2);
+bool icEqualSmallArraySmallJson(smallArrayt *self, smallJsont *array);
/*
- * zip arrays and store in dictionary
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * 1 all the elements from keys and values are in the dictionary
- * 0 some elements from keys and values are in the dictionary or keys or values length is 0
- * -1 keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallDictt* zipArraySmallDict (smallDictt *self, char** keys, smallArrayt *values);
+bool icEqualSmallArrayArray (smallArrayt* self, char ** p2);
/*
- * zip arrays and store in json
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* zipArraySmallJson (smallJsont *self, char** array1, smallArrayt *array2);
+bool icEqualSmallArrayBase (smallArrayt* self, baset* p2);
/*
- * zip arrays and store in json
- *
- * \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * add merge - already existing values are kept
*/
-smallJsont* zipArraySmallJson (smallJsont *self, char** array1, smallArrayt *array2);
-#define zipCharO(self, array1, array2) (self)->f->zipChar(self, array1, array2)
-#define zipCharG zipCharO
+bool icEqualSmallDictBase (smallDictt* self, baset* p2);
/*
- * zip arrays and store in array
- *
- * \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * add merge - already existing values are kept
*/
-smallArrayt* zipCharSmallArray (smallArrayt *self, smallArrayt *array1, char** array2);
+bool icEqualSmallDictSmallJson(smallDictt* self, smallJsont* p2);
/*
- * zip arrays and store in array
- *
- * \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * add merge - already existing values are kept
*/
-smallArrayt* zipCharSmallArray (smallArrayt *self, smallArrayt *array1, char** array2);
+bool icEqualSmallDict (smallDictt* self, smallDictt* p2);
/*
- * zip arrays and store in json
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* zipCharSmallJson (smallJsont *self, smallArrayt *array1, char** array2);
+bool icEqualSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
/*
- * zip arrays and store in json
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* zipCharSmallJson (smallJsont *self, smallArrayt *array1, char** array2);
-#define zipArrayCharO(self, array1, array2) (self)->f->zipArrayChar(self, array1, array2)
-#define zipArrayCharG zipArrayCharO
+bool icEqualSmallJsonArray (smallJsont *self, char ** p2);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipArrayCharSmallArray (smallArrayt *self, char** array1, char** array2);
+bool icEqualSmallJsonBase (smallJsont *self, baset* p2);
/*
- * zip arrays and store in array
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the array
- * (some elements from keys and values are in the array or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* zipArrayCharSmallArray (smallArrayt *self, char** array1, char** array2);
+bool icEqualSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
/*
- * zip arrays and store in json
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* zipArrayCharSmallJson (smallJsont *self, char** array1, char** array2);
+bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
/*
- * zip arrays and store in json
+ * ignore case and compare each element of self and list
*
+ * \param
+ * list
* \return
- * self all the elements from keys and values are in the json
- * (some elements from keys and values are in the json or keys or values length is 0)
- * NULL keys or values is NULL
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* zipArrayCharSmallJson (smallJsont *self, char** array1, char** array2);
-#define readTextSmallStringO(self, filePath) (self)->f->readTextSmallString(self, filePath)
-#define readTextSmallStringG readTextSmallStringO
+bool icEqualSmallJsonSmallString(smallJsont *self, smallStringt *string);
/*
- * read text from filePath to self
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * filePath: file path
+ * list
* \return
- * lines in list
- * empty list when the file is empty
- * -1 on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* readTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+bool icEqualSmallJsonSmallArray (smallJsont *self, smallArrayt *array);
/*
- * read text from filePath to self
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * filePath: file path
+ * list
* \return
- * lines in list
- * empty list when the file is empty
- * -1 on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* readTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+bool icEqualSmallJsonArray (smallJsont *self, char ** p2);
/*
- * read text from filePath to self
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * filePath: file path
+ * list
* \return
- * lines in list
- * empty list when the file is empty
- * -1 on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* readTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+bool icEqualSmallJsonBase (smallJsont *self, baset* p2);
/*
- * read text from filePath to self
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * filePath: file path
+ * list
* \return
- * lines in list
- * empty list when the file is empty
- * -1 on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* readTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
-#define readStreamO(self, fp) (self)->f->readStream(self, fp)
-#define readStreamG readStreamO
+bool icEqualSmallJsonSmallDict (smallJsont* self, smallDictt* p2);
/*
- * return text from stream fp in a list
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * fp: file stream
+ * list
* \return
- * lines in list
- * empty list when there is no data in the stream
- * NULL on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* readStreamSmallArray (smallArrayt *self, FILE *fp);
+bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
/*
- * return text from stream fp in a list
- * new line characters are removed
+ * ignore case and compare each element of self and list
*
* \param
- * fp: file stream
+ * list
* \return
- * lines in list
- * empty list when there is no data in the stream
- * NULL on failure
+ * true the lists have identical elements
+ * false they differ
*/
-smallArrayt* readStreamSmallArray (smallArrayt *self, FILE *fp);
+bool icEqualSmallJsonSmallString(smallJsont *self, smallStringt *string);
/*
- * read file to bool
+ * ignore case equal
+ * compare self to smallString
*
* \param
- * filePath: path to file
+ * smallString to compare
* \return
- * 0 data in file
- * -1 an error occured
+ * true the smallStrings have identical content
+ * false they differ
*/
-smallBoolt* readStreamSmallBool(smallBoolt *self, FILE *fp);
+bool icEqualSmallString (smallStringt *self, smallStringt *string);
/*
- * read file to self
+ * ignore case equal
+ * compare self to smallString
*
* \param
- * filePath: path to file
+ * smallString to compare
* \return
- * 0 data in file
- * -1 an error occured
- */
-smallBytest* readStreamSmallBytes(smallBytest *self, FILE *fp);
+ * true the smallStrings have identical content
+ * false they differ
+ */
+bool icEqualSmallStringBase (smallStringt* self, baset* p2);
/*
- * read file to double
+ * ignore case equal
+ * compare self to smallString
*
* \param
- * filePath: path to file
+ * smallString to compare
* \return
- * 0 data in file
- * -1 an error occured
+ * true the smallStrings have identical content
+ * false they differ
*/
-smallDoublet* readStreamSmallDouble(smallDoublet *self, FILE *fp);
+bool icEqualSmallStringSmallJson(smallStringt* self, smallJsont* p2);
+#define icEqualSmallJsonO(self, array) (self)->f->icEqualSmallJson(self, array)
+#define icEqualSmallJsonG icEqualSmallJsonO
/*
- * read file to int
+ * ignore case and compare each element of self and list
*
* \param
- * filePath: path to file
+ * list
* \return
- * 0 data in file
- * -1 an error occured
+ * true the lists have identical elements
+ * false they differ
*/
-smallIntt* readStreamSmallInt (smallIntt *self, FILE *fp);
+bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
/*
- * read stream to json
- *
- * the format is assumed to be json
+ * ignore case and compare each element of self and list
*
* \param
- * file pointer
+ * list
* \return
- * 0 data in file
- * -1 an error occured
+ * true the lists have identical elements
+ * false they differ
*/
-smallJsont* readStreamSmallJson(smallJsont *self, FILE *fp);
+bool icEqualSmallJsonSmallJson (smallJsont *self, smallJsont *string);
+#define setAtCharO(self, index, c) (self)->f->setAtChar(self, index, c)
+#define setAtCharG setAtCharO
/*
- * read stream to json
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
*
- * the format is assumed to be json
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * file pointer
+ * index: index in array, must be inside the array
+ * string
* \return
- * 0 data in file
- * -1 an error occured
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-smallJsont* readStreamSmallJson(smallJsont *self, FILE *fp);
+smallArrayt* setAtCharSmallArray (smallArrayt *self, intmax_t index, char c);
/*
- * read file to string
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
*
- * 0 is added at the end to terminate the string
+//:pushHelp
*
* \param
- * filePath: path to file
+ * index: index in array, must be inside the array
+ * string
* \return
- * 0 data in file
- * -1 an error occured
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-smallStringt* readStreamSmallString(smallStringt *self, FILE *fp);
-#define writeTextSmallStringO(self, filePath) (self)->f->writeTextSmallString(self, filePath)
-#define writeTextSmallStringG writeTextSmallStringO
+smallArrayt* setAtCharSmallArray (smallArrayt *self, intmax_t index, char c);
/*
- * write array to filePath
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * filePath
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+smallJsont* setAtCharSmallJson (smallJsont *self, intmax_t index, char c);
/*
- * write array to filePath
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+//:pushHelp
*
* \param
- * filePath
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+smallJsont* setAtCharSmallJson (smallJsont *self, intmax_t index, char c);
+#define setAtArraycO(self, index, array) (self)->f->setAtArrayc(self, index, array)
+#define setAtArraycG setAtArraycO
/*
- * write Json to filePath
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * filePath
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+smallArrayt* setAtArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
/*
- * write Json to filePath
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+//:pushHelp
*
* \param
- * filePath
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
-#define writeStreamO(self, fp) (self)->f->writeStream(self, fp)
-#define writeStreamG writeStreamO
+smallArrayt* setAtArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
/*
- * write list to stream
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * fp: file stream
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, fp or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeStreamSmallArray (smallArrayt *self, FILE *fp);
+smallJsont* setAtArraycSmallJson (smallJsont *self, intmax_t index, char **array);
/*
- * write list to stream
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+//:pushHelp
*
* \param
- * fp: file stream
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, fp or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool writeStreamSmallArray (smallArrayt *self, FILE *fp);
+smallJsont* setAtArraycSmallJson (smallJsont *self, intmax_t index, char **array);
+#define setAtSmallBytesO(self, index, value) (self)->f->setAtSmallBytes(self, index, value)
+#define setAtSmallBytesG setAtSmallBytesO
/*
- * write bool to file
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
*
- * \param
- * filePath path to file
- * \return
- * 1 success
- * 0 error
- */
-int writeStreamSmallBool (smallBoolt *self, FILE *fp);
-/*
- * write self to file
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
*
* \param
- * filePath path to file
+ * index: index in array, must be inside the array
+ * string
* \return
- * 1 success
- * 0 error
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-int writeStreamSmallBytes(smallBytest *self, FILE *fp);
+smallArrayt* setAtSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
/*
- * write dictionary to filePath
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+//:pushHelp
*
* \param
- * filePath
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
- */
-bool writeStreamSmallDict (smallDictt *self, FILE *fp);
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
+ */
+smallArrayt* setAtSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
/*
- * write double to file
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * filePath path to file
+ * index: index in array, must be inside the array
+ * string
* \return
- * 1 success
- * 0 error
- */
-int writeStreamSmallDouble (smallDoublet *self, FILE *fp);
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
+ */
+smallJsont* setAtSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
/*
- * write int to file
+ * store object at given index (free already existing elements when baset *value is NULL)
+ * index can be negative
+ *
+//:pushHelp
*
* \param
- * filePath path to file
+ * index: index in array, must be inside the array
+ * string
* \return
- * 1 success
- * 0 error
- */
-int writeStreamSmallInt (smallIntt *self, FILE *fp);
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
+ */
+smallJsont* setAtSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
+#define setAtNFreeArraycO(self, index, array) (self)->f->setAtNFreeArrayc(self, index, array)
+#define setAtNFreeArraycG setAtNFreeArraycO
/*
- * write json to file
+ * store object at given index (free already existing elements)
+ * index can be negative
*
- * the format is assumed to be json
+ * the object parameter is freed
*
* \param
- * file pointer
+ * index: index in array, must be inside the array
* string
* \return
- * 1 success
- * 0 error
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-int writeStreamSmallJson(smallJsont *self, FILE *fp);
+smallArrayt* setAtNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
/*
- * write json to file
+ * store object at given index (free already existing elements)
+ * index can be negative
*
- * the format is assumed to be json
+ * the object parameter is freed
*
* \param
- * file pointer
+ * index: index in array, must be inside the array
* string
* \return
- * 1 success
- * 0 error
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-int writeStreamSmallJson(smallJsont *self, FILE *fp);
+smallArrayt* setAtNFreeArraycSmallArray (smallArrayt *self, intmax_t index, char **array);
/*
- * write string to file
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath path to file
+ * index: index in array, must be inside the array
* string
* \return
- * 1 success
- * 0 error
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-int writeStreamSmallString(smallStringt *self, FILE *fp);
-#define appendTextO(self, filePath) (self)->f->appendText(self, filePath)
-#define appendTextG appendTextO
+smallJsont* setAtNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **array);
/*
- * append list to filePath
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+smallJsont* setAtNFreeArraycSmallJson (smallJsont *self, intmax_t index, char **array);
+#define setAtNFreeSmallBytesO(self, index, value) (self)->f->setAtNFreeSmallBytes(self, index, value)
+#define setAtNFreeSmallBytesG setAtNFreeSmallBytesO
/*
- * append list to filePath
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+smallArrayt* setAtNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
/*
- * append list to filePath
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallJson (smallJsont *self, const char *filePath);
+smallArrayt* setAtNFreeSmallBytesSmallArray (smallArrayt *self, intmax_t index, smallBytest *value);
/*
- * append list to filePath
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallJson (smallJsont *self, const char *filePath);
-#define appendTextSmallStringO(self, filePath) (self)->f->appendTextSmallString(self, filePath)
-#define appendTextSmallStringG appendTextSmallStringO
+smallJsont* setAtNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
/*
- * append list to filePath
+ * store object at given index (free already existing elements)
+ * index can be negative
+ *
+ * the object parameter is freed
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+smallJsont* setAtNFreeSmallBytesSmallJson (smallJsont *self, intmax_t index, smallBytest *value);
+#define setPAtSmallJsonO(self, index, json) (self)->f->setPAtSmallJson(self, index, json)
+#define setPAtSmallJsonG setPAtSmallJsonO
/*
- * append list to filePath
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+smallArrayt* setPAtSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
/*
- * append list to filePath
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+smallArrayt* setPAtSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
/*
- * append list to filePath
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * filePath
- * list
+ * index: index in array, must be inside the array
+ * string
* \return
- * true success
- * false failed, filePath or list are NULL
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-bool appendTextSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
-#define typeStringO(self, index) (self)->f->typeString(self, index)
-#define typeStringG typeStringO
+smallJsont* setPAtSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
/*
- * get object type string at index
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * index in array
+ * index: index in array, must be inside the array
+ * string
* \return
- * object type string
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-const char* typeStringSmallArray (smallArrayt *self, intmax_t index);
+smallJsont* setPAtSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
+#define setPAtNFreeSmallJsonO(self, index, json) (self)->f->setPAtNFreeSmallJson(self, index, json)
+#define setPAtNFreeSmallJsonG setPAtNFreeSmallJsonO
/*
- * get object type string at index
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * index in array
+ * index: index in array, must be inside the array
+ * string
* \return
- * object type string
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-const char* typeStringSmallArray (smallArrayt *self, intmax_t index);
+smallArrayt* setPAtNFreeSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
/*
- * get object type string for key
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * key in dictionary
+ * index: index in array, must be inside the array
+ * string
* \return
- * object type string
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-const char* typeStringSmallDict (smallDictt *self, const char *key);
+smallArrayt* setPAtNFreeSmallJsonSmallArray (smallArrayt *self, intmax_t index, smallJsont *json);
/*
- * get object type string for key or index
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * key in dictionary or index in array
+ * index: index in array, must be inside the array
+ * string
* \return
- * object type string
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-const char* typeStringSmallJson (smallJsont *self, const char *key);
+smallJsont* setPAtNFreeSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
/*
- * get object type string for key or index
+ * store pointer at given index (existing element is not freed)
+ * index can be negative
*
* \param
- * key in dictionary or index in array
+ * index: index in array, must be inside the array
+ * string
* \return
- * object type string
+ * 0 success
+ * -1 error
+ *
+ * Does nothing when:
+ * when array is NULL, index is not set correctly or s is NULL
*/
-const char* typeStringSmallJson (smallJsont *self, const char *key);
-#define typeSmallStringO(self, index) (self)->f->typeSmallString(self, index)
-#define typeSmallStringG typeSmallStringO
+smallJsont* setPAtNFreeSmallJsonSmallJson (smallJsont *self, intmax_t index, smallJsont *value);
+#define hasUndefinedO(self, undefined) (self)->f->hasUndefined(self, undefined)
+#define hasUndefinedG hasUndefinedO
/*
- * get object type string at index
+ * check if self has object
*
* \param
- * index in array
+ * object to find
* \return
- * object type string
+ * true when the object is found
*/
-smallStringt* typeSmallStringSmallArray(smallArrayt *self, intmax_t index);
+bool hasUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
/*
- * get object type string at index
+ * check if self has object
*
* \param
- * index in array
+ * object to find
* \return
- * object type string
+ * true when the object is found
*/
-smallStringt* typeSmallStringSmallArray(smallArrayt *self, intmax_t index);
+bool hasUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
/*
- * get object type string for key
+ * check if self has object
*
* \param
- * key in dictionary
+ * object to find
* \return
- * object type string
+ * true when the object is found
*/
-smallStringt* typeSmallStringSmallDict (smallDictt *self, const char *key);
+bool hasUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
/*
- * get object type string for key or index
+ * check if self has object
*
* \param
- * key in dictionary or index in array
+ * object to find
* \return
- * object type string
+ * true when the object is found
*/
-smallStringt* typeSmallStringSmallJson (smallJsont *self, const char *key);
+bool hasUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+#define hasBoolO(self, value) (self)->f->hasBool(self, value)
+#define hasBoolG hasBoolO
/*
- * get object type string for key or index
+ * check if self has object
*
* \param
- * key in dictionary or index in array
+ * object to find
* \return
- * object type string
+ * true when the object is found
*/
-smallStringt* typeSmallStringSmallJson (smallJsont *self, const char *key);
-#define typeO(self, index) (self)->f->type(self, index)
-#define typeG typeO
+bool hasBoolSmallArray (smallArrayt *self, bool value);
/*
- * get object type at index
+ * check if self has object
*
* \param
- * index in array
+ * object to find
* \return
- * object type
+ * true when the object is found
*/
-char typeSmallArray (smallArrayt *self, intmax_t index);
+bool hasBoolSmallArray (smallArrayt *self, bool value);
/*
- * get object type at index
+ * check if self has object
*
* \param
- * index in array
+ * object to find
* \return
- * object type
+ * true when the object is found
*/
-char typeSmallArray (smallArrayt *self, intmax_t index);
+bool hasBoolSmallJson (smallJsont *self, bool value);
/*
- * get object type for key
+ * check if self has object
*
* \param
- * key in dictionary
+ * object to find
* \return
- * object type
+ * true when the object is found
*/
-char typeSmallDict (smallDictt *self, const char *key);
+bool hasBoolSmallJson (smallJsont *self, bool value);
+#define hasDoubleO(self, value) (self)->f->hasDouble(self, value)
+#define hasDoubleG hasDoubleO
/*
- * get object type for key or index
+ * check if self has object
*
* \param
- * key in dictionary or index in array
+ * object to find
* \return
- * object type
+ * true when the object is found
*/
-char typeSmallJson (smallJsont *self, const char *key);
+bool hasDoubleSmallArray (smallArrayt *self, double value);
/*
- * get object type for key or index
+ * check if self has object
*
* \param
- * key in dictionary or index in array
+ * object to find
* \return
- * object type
+ * true when the object is found
*/
-char typeSmallJson (smallJsont *self, const char *key);
-#define typeStringsO(self) (self)->f->typeStrings(self)
-#define typeStringsG typeStringsO
+bool hasDoubleSmallArray (smallArrayt *self, double value);
/*
- * get first level of object type string in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * list of object type strings
+ * true when the object is found
*/
-char** typeStringsSmallArray(smallArrayt *self);
+bool hasDoubleSmallJson (smallJsont *self, double value);
/*
- * get first level of object type string in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * list of object type strings
+ * true when the object is found
*/
-char** typeStringsSmallArray(smallArrayt *self);
+bool hasDoubleSmallJson (smallJsont *self, double value);
+#define hasIntO(self, value) (self)->f->hasInt(self, value)
+#define hasIntG hasIntO
/*
- * get first level of object type string in dictionary
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * dictionary of object type strings
+ * true when the object is found
*/
-smallDictt* typeStringsSmallDict(smallDictt *self);
+bool hasIntSmallArray (smallArrayt *self, int64_t value);
/*
- * get first level of object type string in json
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * array or dictionary of object type strings
+ * true when the object is found
*/
-smallJsont* typeStringsSmallJson(smallJsont *self);
+bool hasIntSmallArray (smallArrayt *self, int64_t value);
/*
- * get first level of object type string in json
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * array or dictionary of object type strings
+ * true when the object is found
*/
-smallJsont* typeStringsSmallJson(smallJsont *self);
-#define typeSmallStringsO(self) (self)->f->typeSmallStrings(self)
-#define typeSmallStringsG typeSmallStringsO
+bool hasIntSmallJson (smallJsont *self, int64_t value);
/*
- * get first level of object type string in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * list of object type strings
+ * true when the object is found
*/
-smallArrayt* typeSmallStringsSmallArray(smallArrayt *self);
+bool hasIntSmallJson (smallJsont *self, int64_t value);
+#define hasSO(self, string) (self)->f->hasS(self, string)
+#define hasSG hasSO
/*
- * get first level of object type string in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * list of object type strings
+ * true when the object is found
*/
-smallArrayt* typeSmallStringsSmallArray(smallArrayt *self);
-#define typesO(self) (self)->f->types(self)
-#define typesG typesO
+bool hasSSmallArray (smallArrayt *self, const char *string);
/*
- * get first level of object type in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * smallBytes list of object type
+ * true when the object is found
*/
-smallBytest* typesSmallArray (smallArrayt *self);
+bool hasSSmallArray (smallArrayt *self, const char *string);
/*
- * get first level of object type in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * smallBytes list of object type
+ * true when the object is found
*/
-smallBytest* typesSmallArray (smallArrayt *self);
+bool hasSSmallJson (smallJsont *self, const char *string);
/*
- * get first level of object type in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * smallBytes list of object type
+ * true when the object is found
*/
-smallBytest* typesSmallJson (smallJsont *self);
+bool hasSSmallJson (smallJsont *self, const char *string);
+#define hasCharO(self, c) (self)->f->hasChar(self, c)
+#define hasCharG hasCharO
/*
- * get first level of object type in array
+ * check if self has object
*
+ * \param
+ * object to find
* \return
- * smallBytes list of object type
+ * true when the object is found
*/
-smallBytest* typesSmallJson (smallJsont *self);
-#define isETypeO(self, index, type) (self)->f->isEType(self, index, type)
-#define isETypeG isETypeO
+bool hasCharSmallArray (smallArrayt *self, char c);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isETypeSmallArray (smallArrayt *self, intmax_t index, const char *type);
+bool hasCharSmallArray (smallArrayt *self, char c);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isETypeSmallArray (smallArrayt *self, intmax_t index, const char *type);
+bool hasCharSmallJson (smallJsont *self, char c);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isETypeSmallDict (smallDictt *self, const char *key, const char *type);
+bool hasCharSmallJson (smallJsont *self, char c);
/*
- * is element at key of type type
+ * has SmallString
+ *
+ * \param
+ * needle: smallString to find
+ * \return
+ * pointer to first occurence of needle in smallString
+ * NULL when needle is not found
+ * NULL when smallString or needle are NULL
*/
-bool isETypeSmallJson (smallJsont *self, const char *key, const char *type);
+char* hasCharSmallString (smallStringt *self, char c);
+#define hasDictO(self, dict) (self)->f->hasDict(self, dict)
+#define hasDictG hasDictO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isETypeSmallJson (smallJsont *self, const char *key, const char *type);
-#define isEUndefinedO(self, index) (self)->f->isEUndefined(self, index)
-#define isEUndefinedG isEUndefinedO
+bool hasDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEUndefinedSmallArray (smallArrayt *self, intmax_t index);
+bool hasDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEUndefinedSmallArray (smallArrayt *self, intmax_t index);
+bool hasDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEUndefinedSmallDict (smallDictt *self, const char *key);
+bool hasDictSmallJson (smallJsont *self, smallDictt *dict);
+#define hasArrayO(self, array) (self)->f->hasArray(self, array)
+#define hasArrayG hasArrayO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEUndefinedSmallJson (smallJsont *self, const char *key);
+bool hasArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEUndefinedSmallJson (smallJsont *self, const char *key);
-#define isEBoolO(self, index) (self)->f->isEBool(self, index)
-#define isEBoolG isEBoolO
+bool hasArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEBoolSmallArray (smallArrayt *self, intmax_t index);
+bool hasArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEBoolSmallArray (smallArrayt *self, intmax_t index);
+bool hasArraySmallJson (smallJsont *self, smallArrayt *array);
+#define hasArraycO(self, array) (self)->f->hasArrayc(self, array)
+#define hasArraycG hasArraycO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEBoolSmallDict (smallDictt *self, const char *key);
+bool hasArraycSmallArray (smallArrayt *self, char **array);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEBoolSmallJson (smallJsont *self, const char *key);
+bool hasArraycSmallArray (smallArrayt *self, char **array);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEBoolSmallJson (smallJsont *self, const char *key);
-#define isEContainerO(self, index) (self)->f->isEContainer(self, index)
-#define isEContainerG isEContainerO
+bool hasArraycSmallJson (smallJsont *self, char **array);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEContainerSmallArray (smallArrayt *self, intmax_t index);
+bool hasArraycSmallJson (smallJsont *self, char **array);
+#define hasSmallBoolO(self, value) (self)->f->hasSmallBool(self, value)
+#define hasSmallBoolG hasSmallBoolO
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEContainerSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEContainerSmallDict (smallDictt *self, const char *key);
+bool hasSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEContainerSmallJson (smallJsont *self, const char *key);
+bool hasSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEContainerSmallJson (smallJsont *self, const char *key);
-#define isEDictO(self, index) (self)->f->isEDict(self, index)
-#define isEDictG isEDictO
+bool hasSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define hasSmallBytesO(self, value) (self)->f->hasSmallBytes(self, value)
+#define hasSmallBytesG hasSmallBytesO
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDictSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDictSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDictSmallDict (smallDictt *self, const char *key);
+bool hasSmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDictSmallJson (smallJsont *self, const char *key);
+bool hasSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define hasSmallDoubleO(self, value) (self)->f->hasSmallDouble(self, value)
+#define hasSmallDoubleG hasSmallDoubleO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDictSmallJson (smallJsont *self, const char *key);
-#define isEDoubleO(self, index) (self)->f->isEDouble(self, index)
-#define isEDoubleG isEDoubleO
+bool hasSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDoubleSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDoubleSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDoubleSmallDict (smallDictt *self, const char *key);
+bool hasSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define hasSmallIntO(self, value) (self)->f->hasSmallInt(self, value)
+#define hasSmallIntG hasSmallIntO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDoubleSmallJson (smallJsont *self, const char *key);
+bool hasSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEDoubleSmallJson (smallJsont *self, const char *key);
-#define isEIntO(self, index) (self)->f->isEInt(self, index)
-#define isEIntG isEIntO
+bool hasSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEIntSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEIntSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define hasSmallContainerO(self, container) (self)->f->hasSmallContainer(self, container)
+#define hasSmallContainerG hasSmallContainerO
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEIntSmallDict (smallDictt *self, const char *key);
+bool hasSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEIntSmallJson (smallJsont *self, const char *key);
+bool hasSmallContainerSmallArray(smallArrayt *self, smallContainert *container);
/*
- * is element at key of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEIntSmallJson (smallJsont *self, const char *key);
-#define isEStringO(self, index) (self)->f->isEString(self, index)
-#define isEStringG isEStringO
+bool hasSmallContainerSmallJson(smallJsont *self, smallContainert *container);
/*
- * is element at index of type type
+ * check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
*/
-bool isEStringSmallArray (smallArrayt *self, intmax_t index);
+bool hasSmallContainerSmallJson(smallJsont *self, smallContainert *container);
+#define indexOfUndefinedO(self, undefined) (self)->f->indexOfUndefined(self, undefined)
+#define indexOfUndefinedG indexOfUndefinedO
/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEStringSmallArray (smallArrayt *self, intmax_t index);
+ssize_t indexOfUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEStringSmallDict (smallDictt *self, const char *key);
+ssize_t indexOfUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEStringSmallJson (smallJsont *self, const char *key);
+ssize_t indexOfUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEStringSmallJson (smallJsont *self, const char *key);
-#define isEFaststringO(self, index) (self)->f->isEFaststring(self, index)
-#define isEFaststringG isEFaststringO
+ssize_t indexOfUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+#define indexOfBoolO(self, value) (self)->f->indexOfBool(self, value)
+#define indexOfBoolG indexOfBoolO
/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEFaststringSmallArray(smallArrayt *self, intmax_t index);
+ssize_t indexOfBoolSmallArray (smallArrayt *self, bool value);
/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEFaststringSmallArray(smallArrayt *self, intmax_t index);
+ssize_t indexOfBoolSmallArray (smallArrayt *self, bool value);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEFaststringSmallDict(smallDictt *self, const char *key);
+ssize_t indexOfBoolSmallJson (smallJsont *self, bool value);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEFaststringSmallJson(smallJsont *self, const char *key);
+ssize_t indexOfBoolSmallJson (smallJsont *self, bool value);
+#define indexOfDoubleO(self, value) (self)->f->indexOfDouble(self, value)
+#define indexOfDoubleG indexOfDoubleO
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEFaststringSmallJson(smallJsont *self, const char *key);
-#define isEArrayO(self, index) (self)->f->isEArray(self, index)
-#define isEArrayG isEArrayO
+ssize_t indexOfDoubleSmallArray (smallArrayt *self, double value);
/*
- * is element at index of type type
- */
-bool isEArraySmallArray (smallArrayt *self, intmax_t index);
-/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEArraySmallArray (smallArrayt *self, intmax_t index);
+ssize_t indexOfDoubleSmallArray (smallArrayt *self, double value);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEArraySmallDict (smallDictt *self, const char *key);
+ssize_t indexOfDoubleSmallJson (smallJsont *self, double value);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEArraySmallJson (smallJsont *self, const char *key);
+ssize_t indexOfDoubleSmallJson (smallJsont *self, double value);
+#define indexOfIntO(self, value) (self)->f->indexOfInt(self, value)
+#define indexOfIntG indexOfIntO
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEArraySmallJson (smallJsont *self, const char *key);
-#define isEBytesO(self, index) (self)->f->isEBytes(self, index)
-#define isEBytesG isEBytesO
+ssize_t indexOfIntSmallArray (smallArrayt *self, int64_t value);
/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEBytesSmallArray (smallArrayt *self, intmax_t index);
+ssize_t indexOfIntSmallArray (smallArrayt *self, int64_t value);
/*
- * is element at index of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEBytesSmallArray (smallArrayt *self, intmax_t index);
+ssize_t indexOfIntSmallJson (smallJsont *self, int64_t value);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEBytesSmallDict (smallDictt *self, const char *key);
+ssize_t indexOfIntSmallJson (smallJsont *self, int64_t value);
+#define indexOfSO(self, string) (self)->f->indexOfS(self, string)
+#define indexOfSG indexOfSO
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEBytesSmallJson (smallJsont *self, const char *key);
+ssize_t indexOfSSmallArray (smallArrayt *self, const char *string);
/*
- * is element at key of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool isEBytesSmallJson (smallJsont *self, const char *key);
-#define areAllETypeO(self, type) (self)->f->areAllEType(self, type)
-#define areAllETypeG areAllETypeO
+ssize_t indexOfSSmallArray (smallArrayt *self, const char *string);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllETypeSmallArray (smallArrayt *self, const char *type);
+ssize_t indexOfSSmallJson (smallJsont *self, const char *string);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllETypeSmallArray (smallArrayt *self, const char *type);
+ssize_t indexOfSSmallJson (smallJsont *self, const char *string);
+#define indexOfCharO(self, c) (self)->f->indexOfChar(self, c)
+#define indexOfCharG indexOfCharO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllETypeSmallDict (smallDictt *self, const char *type);
+ssize_t indexOfCharSmallArray (smallArrayt *self, char c);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllETypeSmallJson (smallJsont *self, const char *type);
+ssize_t indexOfCharSmallArray (smallArrayt *self, char c);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllETypeSmallJson (smallJsont *self, const char *type);
-#define areAllEUndefinedO(self) (self)->f->areAllEUndefined(self)
-#define areAllEUndefinedG areAllEUndefinedO
+ssize_t indexOfCharSmallJson (smallJsont *self, char c);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEUndefinedSmallArray (smallArrayt *self);
+ssize_t indexOfCharSmallJson (smallJsont *self, char c);
/*
- * are all elements of type type
+ * indexOf SmallString
+ *
+ * \param
+ * needle: smallString to find
+ * \return
+ * index of first occurence of needle in smallString
+ * -1 when needle is not found
+ * -1 when smallString or needle are NULL
*/
-bool areAllEUndefinedSmallArray (smallArrayt *self);
+ssize_t indexOfCharSmallString (smallStringt *self, char c);
+#define indexOfDictO(self, dict) (self)->f->indexOfDict(self, dict)
+#define indexOfDictG indexOfDictO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEUndefinedSmallDict (smallDictt *self);
+ssize_t indexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEUndefinedSmallJson (smallJsont *self);
+ssize_t indexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEUndefinedSmallJson (smallJsont *self);
-#define areAllEBoolO(self) (self)->f->areAllEBool(self)
-#define areAllEBoolG areAllEBoolO
+ssize_t indexOfDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEBoolSmallArray (smallArrayt *self);
+ssize_t indexOfDictSmallJson (smallJsont *self, smallDictt *dict);
+#define indexOfArrayO(self, array) (self)->f->indexOfArray(self, array)
+#define indexOfArrayG indexOfArrayO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEBoolSmallArray (smallArrayt *self);
+ssize_t indexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEBoolSmallDict (smallDictt *self);
+ssize_t indexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEBoolSmallJson (smallJsont *self);
+ssize_t indexOfArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEBoolSmallJson (smallJsont *self);
-#define areAllEContainerO(self) (self)->f->areAllEContainer(self)
-#define areAllEContainerG areAllEContainerO
+ssize_t indexOfArraySmallJson (smallJsont *self, smallArrayt *array);
+#define indexOfArraycO(self, array) (self)->f->indexOfArrayc(self, array)
+#define indexOfArraycG indexOfArraycO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEContainerSmallArray (smallArrayt *self);
+ssize_t indexOfArraycSmallArray (smallArrayt *self, char **array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEContainerSmallArray (smallArrayt *self);
+ssize_t indexOfArraycSmallArray (smallArrayt *self, char **array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEContainerSmallDict (smallDictt *self);
+ssize_t indexOfArraycSmallJson (smallJsont *self, char **array);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEContainerSmallJson (smallJsont *self);
+ssize_t indexOfArraycSmallJson (smallJsont *self, char **array);
+#define indexOfSmallBoolO(self, value) (self)->f->indexOfSmallBool(self, value)
+#define indexOfSmallBoolG indexOfSmallBoolO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEContainerSmallJson (smallJsont *self);
-#define areAllEDictO(self) (self)->f->areAllEDict(self)
-#define areAllEDictG areAllEDictO
+ssize_t indexOfSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDictSmallArray (smallArrayt *self);
+ssize_t indexOfSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDictSmallArray (smallArrayt *self);
+ssize_t indexOfSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDictSmallDict (smallDictt *self);
+ssize_t indexOfSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define indexOfSmallBytesO(self, value) (self)->f->indexOfSmallBytes(self, value)
+#define indexOfSmallBytesG indexOfSmallBytesO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDictSmallJson (smallJsont *self);
+ssize_t indexOfSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDictSmallJson (smallJsont *self);
-#define areAllEDoubleO(self) (self)->f->areAllEDouble(self)
-#define areAllEDoubleG areAllEDoubleO
+ssize_t indexOfSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDoubleSmallArray (smallArrayt *self);
+ssize_t indexOfSmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDoubleSmallArray (smallArrayt *self);
+ssize_t indexOfSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define indexOfSmallDoubleO(self, value) (self)->f->indexOfSmallDouble(self, value)
+#define indexOfSmallDoubleG indexOfSmallDoubleO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDoubleSmallDict (smallDictt *self);
+ssize_t indexOfSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDoubleSmallJson (smallJsont *self);
+ssize_t indexOfSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEDoubleSmallJson (smallJsont *self);
-#define areAllEIntO(self) (self)->f->areAllEInt(self)
-#define areAllEIntG areAllEIntO
+ssize_t indexOfSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEIntSmallArray (smallArrayt *self);
+ssize_t indexOfSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define indexOfSmallIntO(self, value) (self)->f->indexOfSmallInt(self, value)
+#define indexOfSmallIntG indexOfSmallIntO
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEIntSmallArray (smallArrayt *self);
+ssize_t indexOfSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEIntSmallDict (smallDictt *self);
+ssize_t indexOfSmallIntSmallArray (smallArrayt *self, smallIntt *value);
/*
- * are all elements of type type
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
*/
-bool areAllEIntSmallJson (smallJsont *self);
+ssize_t indexOfSmallIntSmallJson (smallJsont *self, smallIntt *value);
+/*
+ * return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t indexOfSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define binarySearchUndefinedO(self, undefined) (self)->f->binarySearchUndefined(self, undefined)
+#define binarySearchUndefinedG binarySearchUndefinedO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchUndefinedSmallArray(smallArrayt *self, undefinedt *undefined);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+#define binarySearchBoolO(self, value) (self)->f->binarySearchBool(self, value)
+#define binarySearchBoolG binarySearchBoolO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchBoolSmallArray (smallArrayt *self, bool value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchBoolSmallArray (smallArrayt *self, bool value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchBoolSmallJson (smallJsont *self, bool value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchBoolSmallJson (smallJsont *self, bool value);
+#define binarySearchDoubleO(self, value) (self)->f->binarySearchDouble(self, value)
+#define binarySearchDoubleG binarySearchDoubleO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDoubleSmallArray (smallArrayt *self, double value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDoubleSmallArray (smallArrayt *self, double value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDoubleSmallJson (smallJsont *self, double value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDoubleSmallJson (smallJsont *self, double value);
+#define binarySearchIntO(self, value) (self)->f->binarySearchInt(self, value)
+#define binarySearchIntG binarySearchIntO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchIntSmallArray (smallArrayt *self, int64_t value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchIntSmallArray (smallArrayt *self, int64_t value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchIntSmallJson (smallJsont *self, int64_t value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchIntSmallJson (smallJsont *self, int64_t value);
+#define binarySearchSO(self, string) (self)->f->binarySearchS(self, string)
+#define binarySearchSG binarySearchSO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSSmallArray (smallArrayt *self, const char *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSSmallArray (smallArrayt *self, const char *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSSmallJson (smallJsont *self, const char *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSSmallJson (smallJsont *self, const char *string);
+#define binarySearchCharO(self, c) (self)->f->binarySearchChar(self, c)
+#define binarySearchCharG binarySearchCharO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchCharSmallArray (smallArrayt *self, char c);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchCharSmallArray (smallArrayt *self, char c);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchCharSmallJson (smallJsont *self, char c);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchCharSmallJson (smallJsont *self, char c);
+#define binarySearchDictO(self, dict) (self)->f->binarySearchDict(self, dict)
+#define binarySearchDictG binarySearchDictO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+#define binarySearchArrayO(self, array) (self)->f->binarySearchArray(self, array)
+#define binarySearchArrayG binarySearchArrayO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+#define binarySearchArraycO(self, array) (self)->f->binarySearchArrayc(self, array)
+#define binarySearchArraycG binarySearchArraycO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraycSmallJson (smallJsont *self, char **array);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchArraycSmallJson (smallJsont *self, char **array);
+#define binarySearchSmallBoolO(self, value) (self)->f->binarySearchSmallBool(self, value)
+#define binarySearchSmallBoolG binarySearchSmallBoolO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBoolSmallArray (smallArrayt *self, smallBoolt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define binarySearchSmallBytesO(self, value) (self)->f->binarySearchSmallBytes(self, value)
+#define binarySearchSmallBytesG binarySearchSmallBytesO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBytesSmallArray (smallArrayt *self, smallBytest *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define binarySearchSmallDoubleO(self, value) (self)->f->binarySearchSmallDouble(self, value)
+#define binarySearchSmallDoubleG binarySearchSmallDoubleO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallDoubleSmallArray (smallArrayt *self, smallDoublet *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define binarySearchSmallIntO(self, value) (self)->f->binarySearchSmallInt(self, value)
+#define binarySearchSmallIntG binarySearchSmallIntO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallIntSmallArray (smallArrayt *self, smallIntt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallIntSmallJson (smallJsont *self, smallIntt *value);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define binarySearchSmallStringO(self, string) (self)->f->binarySearchSmallString(self, string)
+#define binarySearchSmallStringG binarySearchSmallStringO
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallStringSmallArray (smallArrayt *self, smallStringt *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+/*
+ * efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t binarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+#define icHasSO(self, string) (self)->f->icHasS(self, string)
+#define icHasSG icHasSO
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasSSmallJson (smallJsont *self, const char *string);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasSSmallJson (smallJsont *self, const char *string);
+#define icHasCharO(self, c) (self)->f->icHasChar(self, c)
+#define icHasCharG icHasCharO
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasCharSmallJson (smallJsont *self, char c);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasCharSmallJson (smallJsont *self, char c);
+/*
+ * ignore case has SmallString
+ *
+ * \param
+ * needle: smallString to find
+ * \return
+ * pointer to first occurence of needle in smallString
+ * NULL when needle is not found
+ * NULL when smallString or needle are NULL
+ */
+char* icHasCharSmallString (smallStringt *self, char c);
+#define icHasDictO(self, dict) (self)->f->icHasDict(self, dict)
+#define icHasDictG icHasDictO
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasDictSmallJson (smallJsont *self, smallDictt *dict);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasDictSmallJson (smallJsont *self, smallDictt *dict);
+#define icHasArrayO(self, array) (self)->f->icHasArray(self, array)
+#define icHasArrayG icHasArrayO
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraySmallJson (smallJsont *self, smallArrayt *array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraySmallJson (smallJsont *self, smallArrayt *array);
+#define icHasArraycO(self, array) (self)->f->icHasArrayc(self, array)
+#define icHasArraycG icHasArraycO
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraycSmallJson (smallJsont *self, char **array);
+/*
+ * ignore case and check if self has object
+ *
+ * \param
+ * object to find
+ * \return
+ * true when the object is found
+ */
+bool icHasArraycSmallJson (smallJsont *self, char **array);
+#define icIndexOfSO(self, string) (self)->f->icIndexOfS(self, string)
+#define icIndexOfSG icIndexOfSO
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfSSmallJson (smallJsont *self, const char *string);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfSSmallJson (smallJsont *self, const char *string);
+#define icIndexOfCharO(self, c) (self)->f->icIndexOfChar(self, c)
+#define icIndexOfCharG icIndexOfCharO
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfCharSmallJson (smallJsont *self, char c);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfCharSmallJson (smallJsont *self, char c);
+/*
+ * ignore case indexOf SmallString
+ *
+ * \param
+ * needle: smallString to find
+ * \return
+ * index of first occurence of needle in smallString
+ * -1 when needle is not found
+ * -1 when smallString or needle are NULL
+ */
+ssize_t icIndexOfCharSmallString (smallStringt *self, char c);
+#define icIndexOfDictO(self, dict) (self)->f->icIndexOfDict(self, dict)
+#define icIndexOfDictG icIndexOfDictO
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfDictSmallJson (smallJsont *self, smallDictt *dict);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfDictSmallJson (smallJsont *self, smallDictt *dict);
+#define icIndexOfArrayO(self, array) (self)->f->icIndexOfArray(self, array)
+#define icIndexOfArrayG icIndexOfArrayO
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraySmallJson (smallJsont *self, smallArrayt *array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraySmallJson (smallJsont *self, smallArrayt *array);
+#define icIndexOfArraycO(self, array) (self)->f->icIndexOfArrayc(self, array)
+#define icIndexOfArraycG icIndexOfArraycO
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraycSmallJson (smallJsont *self, char **array);
+/*
+ * ignore case and return index of object in list
+ *
+ * \param
+ * value
+ * \return
+ * index
+ * -1 when the value is not found
+ * -1 when array or value are NULL
+ */
+ssize_t icIndexOfArraycSmallJson (smallJsont *self, char **array);
+#define icBinarySearchSO(self, string) (self)->f->icBinarySearchS(self, string)
+#define icBinarySearchSG icBinarySearchSO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSSmallArray (smallArrayt *self, const char *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSSmallJson (smallJsont *self, const char *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSSmallJson (smallJsont *self, const char *string);
+#define icBinarySearchCharO(self, c) (self)->f->icBinarySearchChar(self, c)
+#define icBinarySearchCharG icBinarySearchCharO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchCharSmallArray (smallArrayt *self, char c);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchCharSmallJson (smallJsont *self, char c);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchCharSmallJson (smallJsont *self, char c);
+#define icBinarySearchDictO(self, dict) (self)->f->icBinarySearchDict(self, dict)
+#define icBinarySearchDictG icBinarySearchDictO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchDictSmallArray (smallArrayt *self, smallDictt *dict);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchDictSmallJson (smallJsont *self, smallDictt *dict);
+#define icBinarySearchArrayO(self, array) (self)->f->icBinarySearchArray(self, array)
+#define icBinarySearchArrayG icBinarySearchArrayO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraySmallArray (smallArrayt *self, smallArrayt *array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraySmallJson (smallJsont *self, smallArrayt *array);
+#define icBinarySearchArraycO(self, array) (self)->f->icBinarySearchArrayc(self, array)
+#define icBinarySearchArraycG icBinarySearchArraycO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraycSmallArray (smallArrayt *self, char **array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraycSmallJson (smallJsont *self, char **array);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchArraycSmallJson (smallJsont *self, char **array);
+#define icBinarySearchSmallStringO(self, string) (self)->f->icBinarySearchSmallString(self, string)
+#define icBinarySearchSmallStringG icBinarySearchSmallStringO
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSmallStringSmallArray(smallArrayt *self, smallStringt *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSmallStringSmallArray(smallArrayt *self, smallStringt *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+/*
+ * ignore case and efficiently finds the index of object in list
+ * the list has be sorted with the sort function
+ *
+ * \param
+ * value to search
+ * \return
+ * index of value
+ * -1 value not found or NULL input pointers
+ */
+ssize_t icBinarySearchSmallStringSmallJson (smallJsont *self, smallStringt *string);
+#define forEachO(self, closure, funcElem) (self)->f->forEach(self, closure, funcElem)
+#define forEachG forEachO
+/*
+ * for each loop on elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void forEachSmallArray (smallArrayt *self, void *closure, forEachElementSmallArrayFt funcElem);
+/*
+ * for each loop on elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void forEachSmallArray (smallArrayt *self, void *closure, forEachElementSmallArrayFt funcElem);
+/*
+ * for each loop on elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void forEachSmallJson (smallJsont *self, void *closure, forEachElementSmallJsonFt funcElem);
+/*
+ * for each loop on elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void forEachSmallJson (smallJsont *self, void *closure, forEachElementSmallJsonFt funcElem);
+#define enumerateO(self, closure, funcElem) (self)->f->enumerate(self, closure, funcElem)
+#define enumerateG enumerateO
+/*
+ * enumerate elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void enumerateSmallArray (smallArrayt *self, void *closure, enumerateElementSmallArrayFt funcElem);
+/*
+ * enumerate elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void enumerateSmallArray (smallArrayt *self, void *closure, enumerateElementSmallArrayFt funcElem);
+/*
+ * enumerate elements in the dictionary
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void enumerateSmallDict (smallDictt *self, void *closure, enumerateElementSmallDictFt funcElem);
+/*
+ * enumerate elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void enumerateSmallJson (smallJsont *self, void *closure, enumerateElementSmallJsonFt funcElem);
+/*
+ * enumerate elements in the Array
+ *
+ * \param
+ * closure user defined pointer
+ * \param
+ * funcElem user defined function call on each element
+ */
+void enumerateSmallJson (smallJsont *self, void *closure, enumerateElementSmallJsonFt funcElem);
+#define iterStartO(self) (self)->f->iterStart(self)
+#define iterStartG iterStartO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartSmallDict (smallDictt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartSmallJson (smallJsont *self);
+#define iterStartLastO(self) (self)->f->iterStartLast(self)
+#define iterStartLastG iterStartLastO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartLastSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartLastSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartLastSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartLastSmallJson (smallJsont *self);
+#define iterStartFromO(self, index) (self)->f->iterStartFrom(self, index)
+#define iterStartFromG iterStartFromO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromSmallJson (smallJsont *self, intmax_t index);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromSmallJson (smallJsont *self, intmax_t index);
+#define iterStartFromStepO(self, index, step) (self)->f->iterStartFromStep(self, index, step)
+#define iterStartFromStepG iterStartFromStepO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromStepSmallArray (smallArrayt *self, intmax_t index, intmax_t step);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromStepSmallArray (smallArrayt *self, intmax_t index, intmax_t step);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromStepSmallJson(smallJsont *self, intmax_t index, intmax_t step);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterStartFromStepSmallJson(smallJsont *self, intmax_t index, intmax_t step);
+#define iterNextO(self) (self)->f->iterNext(self)
+#define iterNextG iterNextO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterNextSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterNextSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterNextSmallDict (smallDictt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterNextSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterNextSmallJson (smallJsont *self);
+#define iterElementO(self) (self)->f->iterElement(self)
+#define iterElementG iterElementO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterElementSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterElementSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterElementSmallDict (smallDictt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterElementSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+baset* iterElementSmallJson (smallJsont *self);
+#define iterIndexO(self) (self)->f->iterIndex(self)
+#define iterIndexG iterIndexO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+ssize_t iterIndexSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+ssize_t iterIndexSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+ssize_t iterIndexSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+ssize_t iterIndexSmallJson (smallJsont *self);
+#define iterStepO(self) (self)->f->iterStep(self)
+#define iterStepG iterStepO
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+intmax_t iterStepSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(array, e) {
+ * logVarG(e);
+ * }
+ */
+intmax_t iterStepSmallArray (smallArrayt *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+intmax_t iterStepSmallJson (smallJsont *self);
+/*
+ * iterator
+ *
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
+ */
+intmax_t iterStepSmallJson (smallJsont *self);
+#define joinCharO(self, c) (self)->f->joinChar(self, c)
+#define joinCharG joinCharO
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinCharSmallArray (smallArrayt *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinCharSmallArray (smallArrayt *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinCharSmallJson (smallJsont *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinCharSmallJson (smallJsont *self, char c);
+#define joinSmallStringO(self, delim) (self)->f->joinSmallString(self, delim)
+#define joinSmallStringG joinSmallStringO
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinSmallStringSmallArray(smallArrayt *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinSmallStringSmallArray(smallArrayt *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinSmallStringSmallJson(smallJsont *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+smallStringt* joinSmallStringSmallJson(smallJsont *self, smallStringt* delim);
+#define joinCharSO(self, c) (self)->f->joinCharS(self, c)
+#define joinCharSG joinCharSO
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinCharSSmallArray (smallArrayt *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinCharSSmallArray (smallArrayt *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinCharSSmallJson (smallJsont *self, char c);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinCharSSmallJson (smallJsont *self, char c);
+#define joinSmallJsonSO(self, delim) (self)->f->joinSmallJsonS(self, delim)
+#define joinSmallJsonSG joinSmallJsonSO
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallJsonSSmallArray (smallArrayt *self, smallJsont* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallJsonSSmallArray (smallArrayt *self, smallJsont* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallJsonSSmallJson (smallJsont *self, smallJsont* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallJsonSSmallJson (smallJsont *self, smallJsont* delim);
+#define joinSmallStringSO(self, delim) (self)->f->joinSmallStringS(self, delim)
+#define joinSmallStringSG joinSmallStringSO
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallStringSSmallArray(smallArrayt *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallStringSSmallArray(smallArrayt *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallStringSSmallJson(smallJsont *self, smallStringt* delim);
+/*
+ * join list, the elements are seperated with delim in the resulting string
+ *
+ * \param
+ * delim: string seperator
+ * \return
+ * joined string
+ * NULL when list or delim are NULL
+ */
+char* joinSmallStringSSmallJson(smallJsont *self, smallStringt* delim);
+#define zipSmallJsonSmallJsonO(self, array1, array2) (self)->f->zipSmallJsonSmallJson(self, array1, array2)
+#define zipSmallJsonSmallJsonG zipSmallJsonSmallJsonO
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipSmallJsonSmallJsonSmallArray (smallArrayt *self, smallJsont *array1, smallJsont *array2);
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipSmallJsonSmallJsonSmallArray (smallArrayt *self, smallJsont *array1, smallJsont *array2);
+/*
+ * zip arrays and store in dictionary
+ *
+ * \return
+ * 1 all the elements from keys and values are in the dictionary
+ * 0 some elements from keys and values are in the dictionary or keys or values length is 0
+ * -1 keys or values is NULL
+ */
+smallDictt* zipSmallJsonSmallJsonSmallDict (smallDictt *self, smallJsont *keys, smallJsont *values);
+#define zipSmallJsonCharO(self, array1, array2) (self)->f->zipSmallJsonChar(self, array1, array2)
+#define zipSmallJsonCharG zipSmallJsonCharO
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipSmallJsonCharSmallArray (smallArrayt *self, smallJsont *array1, char **array2);
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipSmallJsonCharSmallArray (smallArrayt *self, smallJsont *array1, char **array2);
+#define zipArrayO(self, array1, array2) (self)->f->zipArray(self, array1, array2)
+#define zipArrayG zipArrayO
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipArraySmallArray (smallArrayt *self, char** array1, smallArrayt *array2);
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipArraySmallArray (smallArrayt *self, char** array1, smallArrayt *array2);
+/*
+ * zip arrays and store in dictionary
+ *
+ * \return
+ * 1 all the elements from keys and values are in the dictionary
+ * 0 some elements from keys and values are in the dictionary or keys or values length is 0
+ * -1 keys or values is NULL
+ */
+smallDictt* zipArraySmallDict (smallDictt *self, char** keys, smallArrayt *values);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipArraySmallJson (smallJsont *self, char** array1, smallArrayt *array2);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipArraySmallJson (smallJsont *self, char** array1, smallArrayt *array2);
+#define zipCharO(self, array1, array2) (self)->f->zipChar(self, array1, array2)
+#define zipCharG zipCharO
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipCharSmallArray (smallArrayt *self, smallArrayt *array1, char** array2);
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipCharSmallArray (smallArrayt *self, smallArrayt *array1, char** array2);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipCharSmallJson (smallJsont *self, smallArrayt *array1, char** array2);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipCharSmallJson (smallJsont *self, smallArrayt *array1, char** array2);
+#define zipArrayCharO(self, array1, array2) (self)->f->zipArrayChar(self, array1, array2)
+#define zipArrayCharG zipArrayCharO
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipArrayCharSmallArray (smallArrayt *self, char** array1, char** array2);
+/*
+ * zip arrays and store in array
+ *
+ * \return
+ * self all the elements from keys and values are in the array
+ * (some elements from keys and values are in the array or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallArrayt* zipArrayCharSmallArray (smallArrayt *self, char** array1, char** array2);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipArrayCharSmallJson (smallJsont *self, char** array1, char** array2);
+/*
+ * zip arrays and store in json
+ *
+ * \return
+ * self all the elements from keys and values are in the json
+ * (some elements from keys and values are in the json or keys or values length is 0)
+ * NULL keys or values is NULL
+ */
+smallJsont* zipArrayCharSmallJson (smallJsont *self, char** array1, char** array2);
+#define readTextSmallStringO(self, filePath) (self)->f->readTextSmallString(self, filePath)
+#define readTextSmallStringG readTextSmallStringO
+/*
+ * read text from filePath to self
+ * new line characters are removed
+ *
+ * \param
+ * filePath: file path
+ * \return
+ * lines in list
+ * empty list when the file is empty
+ * -1 on failure
+ */
+smallArrayt* readTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * read text from filePath to self
+ * new line characters are removed
+ *
+ * \param
+ * filePath: file path
+ * \return
+ * lines in list
+ * empty list when the file is empty
+ * -1 on failure
+ */
+smallArrayt* readTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * read text from filePath to self
+ * new line characters are removed
+ *
+ * \param
+ * filePath: file path
+ * \return
+ * lines in list
+ * empty list when the file is empty
+ * -1 on failure
+ */
+smallJsont* readTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+/*
+ * read text from filePath to self
+ * new line characters are removed
+ *
+ * \param
+ * filePath: file path
+ * \return
+ * lines in list
+ * empty list when the file is empty
+ * -1 on failure
+ */
+smallJsont* readTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+#define readStreamO(self, fp) (self)->f->readStream(self, fp)
+#define readStreamG readStreamO
+/*
+ * return text from stream fp in a list
+ * new line characters are removed
+ *
+ * \param
+ * fp: file stream
+ * \return
+ * lines in list
+ * empty list when there is no data in the stream
+ * NULL on failure
+ */
+smallArrayt* readStreamSmallArray (smallArrayt *self, FILE *fp);
+/*
+ * return text from stream fp in a list
+ * new line characters are removed
+ *
+ * \param
+ * fp: file stream
+ * \return
+ * lines in list
+ * empty list when there is no data in the stream
+ * NULL on failure
+ */
+smallArrayt* readStreamSmallArray (smallArrayt *self, FILE *fp);
+/*
+ * read file to bool
+ *
+ * \param
+ * filePath: path to file
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallBoolt* readStreamSmallBool(smallBoolt *self, FILE *fp);
+/*
+ * read file to self
+ *
+ * \param
+ * filePath: path to file
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallBytest* readStreamSmallBytes(smallBytest *self, FILE *fp);
+/*
+ * read file to double
+ *
+ * \param
+ * filePath: path to file
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallDoublet* readStreamSmallDouble(smallDoublet *self, FILE *fp);
+/*
+ * read file to int
+ *
+ * \param
+ * filePath: path to file
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallIntt* readStreamSmallInt (smallIntt *self, FILE *fp);
+/*
+ * read stream to json
+ *
+ * the format is assumed to be json
+ *
+ * \param
+ * file pointer
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallJsont* readStreamSmallJson(smallJsont *self, FILE *fp);
+/*
+ * read stream to json
+ *
+ * the format is assumed to be json
+ *
+ * \param
+ * file pointer
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallJsont* readStreamSmallJson(smallJsont *self, FILE *fp);
+/*
+ * read file to string
+ *
+ * 0 is added at the end to terminate the string
+ *
+ * \param
+ * filePath: path to file
+ * \return
+ * 0 data in file
+ * -1 an error occured
+ */
+smallStringt* readStreamSmallString(smallStringt *self, FILE *fp);
+#define writeTextSmallStringO(self, filePath) (self)->f->writeTextSmallString(self, filePath)
+#define writeTextSmallStringG writeTextSmallStringO
+/*
+ * write array to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool writeTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * write array to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool writeTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * write Json to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool writeTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+/*
+ * write Json to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool writeTextSmallStringSmallJson (smallJsont *self, smallStringt *filePath);
+#define writeStreamO(self, fp) (self)->f->writeStream(self, fp)
+#define writeStreamG writeStreamO
+/*
+ * write list to stream
+ *
+ * \param
+ * fp: file stream
+ * list
+ * \return
+ * true success
+ * false failed, fp or list are NULL
+ */
+bool writeStreamSmallArray (smallArrayt *self, FILE *fp);
+/*
+ * write list to stream
+ *
+ * \param
+ * fp: file stream
+ * list
+ * \return
+ * true success
+ * false failed, fp or list are NULL
+ */
+bool writeStreamSmallArray (smallArrayt *self, FILE *fp);
+/*
+ * write bool to file
+ *
+ * \param
+ * filePath path to file
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallBool (smallBoolt *self, FILE *fp);
+/*
+ * write self to file
+ *
+ * \param
+ * filePath path to file
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallBytes(smallBytest *self, FILE *fp);
+/*
+ * write dictionary to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool writeStreamSmallDict (smallDictt *self, FILE *fp);
+/*
+ * write double to file
+ *
+ * \param
+ * filePath path to file
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallDouble (smallDoublet *self, FILE *fp);
+/*
+ * write int to file
+ *
+ * \param
+ * filePath path to file
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallInt (smallIntt *self, FILE *fp);
+/*
+ * write json to file
+ *
+ * the format is assumed to be json
+ *
+ * \param
+ * file pointer
+ * string
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallJson(smallJsont *self, FILE *fp);
+/*
+ * write json to file
+ *
+ * the format is assumed to be json
+ *
+ * \param
+ * file pointer
+ * string
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallJson(smallJsont *self, FILE *fp);
+/*
+ * write string to file
+ *
+ * \param
+ * filePath path to file
+ * string
+ * \return
+ * 1 success
+ * 0 error
+ */
+int writeStreamSmallString(smallStringt *self, FILE *fp);
+#define appendTextO(self, filePath) (self)->f->appendText(self, filePath)
+#define appendTextG appendTextO
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallArray (smallArrayt *self, const char *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallJson (smallJsont *self, const char *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallJson (smallJsont *self, const char *filePath);
+#define appendTextSmallStringO(self, filePath) (self)->f->appendTextSmallString(self, filePath)
+#define appendTextSmallStringG appendTextSmallStringO
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallStringSmallArray(smallArrayt *self, smallStringt *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+/*
+ * append list to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or list are NULL
+ */
+bool appendTextSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+#define typeStringO(self, index) (self)->f->typeString(self, index)
+#define typeStringG typeStringO
+/*
+ * get object type string at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type string
+ */
+const char* typeStringSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * get object type string at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type string
+ */
+const char* typeStringSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * get object type string for key
+ *
+ * \param
+ * key in dictionary
+ * \return
+ * object type string
+ */
+const char* typeStringSmallDict (smallDictt *self, const char *key);
+/*
+ * get object type string for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type string
+ */
+const char* typeStringSmallJson (smallJsont *self, const char *key);
+/*
+ * get object type string for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type string
+ */
+const char* typeStringSmallJson (smallJsont *self, const char *key);
+#define typeSmallStringO(self, index) (self)->f->typeSmallString(self, index)
+#define typeSmallStringG typeSmallStringO
+/*
+ * get object type string at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type string
+ */
+smallStringt* typeSmallStringSmallArray(smallArrayt *self, intmax_t index);
+/*
+ * get object type string at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type string
+ */
+smallStringt* typeSmallStringSmallArray(smallArrayt *self, intmax_t index);
+/*
+ * get object type string for key
+ *
+ * \param
+ * key in dictionary
+ * \return
+ * object type string
+ */
+smallStringt* typeSmallStringSmallDict (smallDictt *self, const char *key);
+/*
+ * get object type string for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type string
+ */
+smallStringt* typeSmallStringSmallJson (smallJsont *self, const char *key);
+/*
+ * get object type string for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type string
+ */
+smallStringt* typeSmallStringSmallJson (smallJsont *self, const char *key);
+#define typeO(self, index) (self)->f->type(self, index)
+#define typeG typeO
+/*
+ * get object type at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type
+ */
+char typeSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * get object type at index
+ *
+ * \param
+ * index in array
+ * \return
+ * object type
+ */
+char typeSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * get object type for key
+ *
+ * \param
+ * key in dictionary
+ * \return
+ * object type
+ */
+char typeSmallDict (smallDictt *self, const char *key);
+/*
+ * get object type for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type
+ */
+char typeSmallJson (smallJsont *self, const char *key);
+/*
+ * get object type for key or index
+ *
+ * \param
+ * key in dictionary or index in array
+ * \return
+ * object type
+ */
+char typeSmallJson (smallJsont *self, const char *key);
+#define typeStringsO(self) (self)->f->typeStrings(self)
+#define typeStringsG typeStringsO
+/*
+ * get first level of object type string in array
+ *
+ * \return
+ * list of object type strings
+ */
+char** typeStringsSmallArray(smallArrayt *self);
+/*
+ * get first level of object type string in array
+ *
+ * \return
+ * list of object type strings
+ */
+char** typeStringsSmallArray(smallArrayt *self);
+/*
+ * get first level of object type string in dictionary
+ *
+ * \return
+ * dictionary of object type strings
+ */
+smallDictt* typeStringsSmallDict(smallDictt *self);
+/*
+ * get first level of object type string in json
+ *
+ * \return
+ * array or dictionary of object type strings
+ */
+smallJsont* typeStringsSmallJson(smallJsont *self);
+/*
+ * get first level of object type string in json
+ *
+ * \return
+ * array or dictionary of object type strings
+ */
+smallJsont* typeStringsSmallJson(smallJsont *self);
+#define typeSmallStringsO(self) (self)->f->typeSmallStrings(self)
+#define typeSmallStringsG typeSmallStringsO
+/*
+ * get first level of object type string in array
+ *
+ * \return
+ * list of object type strings
+ */
+smallArrayt* typeSmallStringsSmallArray(smallArrayt *self);
+/*
+ * get first level of object type string in array
+ *
+ * \return
+ * list of object type strings
+ */
+smallArrayt* typeSmallStringsSmallArray(smallArrayt *self);
+#define typesO(self) (self)->f->types(self)
+#define typesG typesO
+/*
+ * get first level of object type in array
+ *
+ * \return
+ * smallBytes list of object type
+ */
+smallBytest* typesSmallArray (smallArrayt *self);
+/*
+ * get first level of object type in array
+ *
+ * \return
+ * smallBytes list of object type
+ */
+smallBytest* typesSmallArray (smallArrayt *self);
+/*
+ * get first level of object type in array
+ *
+ * \return
+ * smallBytes list of object type
+ */
+smallBytest* typesSmallJson (smallJsont *self);
+/*
+ * get first level of object type in array
+ *
+ * \return
+ * smallBytes list of object type
+ */
+smallBytest* typesSmallJson (smallJsont *self);
+#define isETypeO(self, index, type) (self)->f->isEType(self, index, type)
+#define isETypeG isETypeO
+/*
+ * is element at index of type type
+ */
+bool isETypeSmallArray (smallArrayt *self, intmax_t index, const char *type);
+/*
+ * is element at index of type type
+ */
+bool isETypeSmallArray (smallArrayt *self, intmax_t index, const char *type);
+/*
+ * is element at key of type type
+ */
+bool isETypeSmallDict (smallDictt *self, const char *key, const char *type);
+/*
+ * is element at key of type type
+ */
+bool isETypeSmallJson (smallJsont *self, const char *key, const char *type);
+/*
+ * is element at key of type type
+ */
+bool isETypeSmallJson (smallJsont *self, const char *key, const char *type);
+#define isEUndefinedO(self, index) (self)->f->isEUndefined(self, index)
+#define isEUndefinedG isEUndefinedO
+/*
+ * is element at index of type type
+ */
+bool isEUndefinedSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEUndefinedSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEUndefinedSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEUndefinedSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEUndefinedSmallJson (smallJsont *self, const char *key);
+#define isEBoolO(self, index) (self)->f->isEBool(self, index)
+#define isEBoolG isEBoolO
+/*
+ * is element at index of type type
+ */
+bool isEBoolSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEBoolSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEBoolSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEBoolSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEBoolSmallJson (smallJsont *self, const char *key);
+#define isEContainerO(self, index) (self)->f->isEContainer(self, index)
+#define isEContainerG isEContainerO
+/*
+ * is element at index of type type
+ */
+bool isEContainerSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEContainerSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEContainerSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEContainerSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEContainerSmallJson (smallJsont *self, const char *key);
+#define isEDictO(self, index) (self)->f->isEDict(self, index)
+#define isEDictG isEDictO
+/*
+ * is element at index of type type
+ */
+bool isEDictSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEDictSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEDictSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEDictSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEDictSmallJson (smallJsont *self, const char *key);
+#define isEDoubleO(self, index) (self)->f->isEDouble(self, index)
+#define isEDoubleG isEDoubleO
+/*
+ * is element at index of type type
+ */
+bool isEDoubleSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEDoubleSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEDoubleSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEDoubleSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEDoubleSmallJson (smallJsont *self, const char *key);
+#define isEIntO(self, index) (self)->f->isEInt(self, index)
+#define isEIntG isEIntO
+/*
+ * is element at index of type type
+ */
+bool isEIntSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEIntSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEIntSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEIntSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEIntSmallJson (smallJsont *self, const char *key);
+#define isEStringO(self, index) (self)->f->isEString(self, index)
+#define isEStringG isEStringO
+/*
+ * is element at index of type type
+ */
+bool isEStringSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEStringSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEStringSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEStringSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEStringSmallJson (smallJsont *self, const char *key);
+#define isEFaststringO(self, index) (self)->f->isEFaststring(self, index)
+#define isEFaststringG isEFaststringO
+/*
+ * is element at index of type type
+ */
+bool isEFaststringSmallArray(smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEFaststringSmallArray(smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEFaststringSmallDict(smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEFaststringSmallJson(smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEFaststringSmallJson(smallJsont *self, const char *key);
+#define isEArrayO(self, index) (self)->f->isEArray(self, index)
+#define isEArrayG isEArrayO
+/*
+ * is element at index of type type
+ */
+bool isEArraySmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEArraySmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEArraySmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEArraySmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEArraySmallJson (smallJsont *self, const char *key);
+#define isEBytesO(self, index) (self)->f->isEBytes(self, index)
+#define isEBytesG isEBytesO
+/*
+ * is element at index of type type
+ */
+bool isEBytesSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at index of type type
+ */
+bool isEBytesSmallArray (smallArrayt *self, intmax_t index);
+/*
+ * is element at key of type type
+ */
+bool isEBytesSmallDict (smallDictt *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEBytesSmallJson (smallJsont *self, const char *key);
+/*
+ * is element at key of type type
+ */
+bool isEBytesSmallJson (smallJsont *self, const char *key);
+#define areAllETypeO(self, type) (self)->f->areAllEType(self, type)
+#define areAllETypeG areAllETypeO
+/*
+ * are all elements of type type
+ */
+bool areAllETypeSmallArray (smallArrayt *self, const char *type);
+/*
+ * are all elements of type type
+ */
+bool areAllETypeSmallArray (smallArrayt *self, const char *type);
+/*
+ * are all elements of type type
+ */
+bool areAllETypeSmallDict (smallDictt *self, const char *type);
+/*
+ * are all elements of type type
+ */
+bool areAllETypeSmallJson (smallJsont *self, const char *type);
+/*
+ * are all elements of type type
+ */
+bool areAllETypeSmallJson (smallJsont *self, const char *type);
+#define areAllEUndefinedO(self) (self)->f->areAllEUndefined(self)
+#define areAllEUndefinedG areAllEUndefinedO
+/*
+ * are all elements of type type
+ */
+bool areAllEUndefinedSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEUndefinedSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEUndefinedSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEUndefinedSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEUndefinedSmallJson (smallJsont *self);
+#define areAllEBoolO(self) (self)->f->areAllEBool(self)
+#define areAllEBoolG areAllEBoolO
+/*
+ * are all elements of type type
+ */
+bool areAllEBoolSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBoolSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBoolSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBoolSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBoolSmallJson (smallJsont *self);
+#define areAllEContainerO(self) (self)->f->areAllEContainer(self)
+#define areAllEContainerG areAllEContainerO
+/*
+ * are all elements of type type
+ */
+bool areAllEContainerSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEContainerSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEContainerSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEContainerSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEContainerSmallJson (smallJsont *self);
+#define areAllEDictO(self) (self)->f->areAllEDict(self)
+#define areAllEDictG areAllEDictO
+/*
+ * are all elements of type type
+ */
+bool areAllEDictSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDictSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDictSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDictSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDictSmallJson (smallJsont *self);
+#define areAllEDoubleO(self) (self)->f->areAllEDouble(self)
+#define areAllEDoubleG areAllEDoubleO
+/*
+ * are all elements of type type
+ */
+bool areAllEDoubleSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDoubleSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDoubleSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDoubleSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEDoubleSmallJson (smallJsont *self);
+#define areAllEIntO(self) (self)->f->areAllEInt(self)
+#define areAllEIntG areAllEIntO
+/*
+ * are all elements of type type
+ */
+bool areAllEIntSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEIntSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEIntSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEIntSmallJson (smallJsont *self);
/*
* are all elements of type type
*/
-bool areAllEIntSmallJson (smallJsont *self);
-#define areAllEStringO(self) (self)->f->areAllEString(self)
-#define areAllEStringG areAllEStringO
+bool areAllEIntSmallJson (smallJsont *self);
+#define areAllEStringO(self) (self)->f->areAllEString(self)
+#define areAllEStringG areAllEStringO
+/*
+ * are all elements of type type
+ */
+bool areAllEStringSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEStringSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEStringSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEStringSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEStringSmallJson (smallJsont *self);
+#define areAllEFaststringO(self) (self)->f->areAllEFaststring(self)
+#define areAllEFaststringG areAllEFaststringO
+/*
+ * are all elements of type type
+ */
+bool areAllEFaststringSmallArray(smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEFaststringSmallArray(smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEFaststringSmallDict(smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEFaststringSmallJson(smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEFaststringSmallJson(smallJsont *self);
+#define areAllEArrayO(self) (self)->f->areAllEArray(self)
+#define areAllEArrayG areAllEArrayO
+/*
+ * are all elements of type type
+ */
+bool areAllEArraySmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEArraySmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEArraySmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEArraySmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEArraySmallJson (smallJsont *self);
+#define areAllEBytesO(self) (self)->f->areAllEBytes(self)
+#define areAllEBytesG areAllEBytesO
+/*
+ * are all elements of type type
+ */
+bool areAllEBytesSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBytesSmallArray (smallArrayt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBytesSmallDict (smallDictt *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBytesSmallJson (smallJsont *self);
+/*
+ * are all elements of type type
+ */
+bool areAllEBytesSmallJson (smallJsont *self);
+#define setInt64O(self, p2) (self)->f->setInt64(self, p2)
+#define setInt64G setInt64O
+/*
+ * set smallBool
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallBoolt* setInt64SmallBool (smallBoolt* self, int64_t p2);
+/*
+ * set double
+ *
+ * \param
+ * double to store in object
+ */
+smallDoublet* setInt64SmallDouble(smallDoublet* self, int64_t p2);
+/*
+ * set smallString
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallStringt* setInt64SmallString (smallStringt* self, int64_t p2);
+#define setInt32O(self, p2) (self)->f->setInt32(self, p2)
+#define setInt32G setInt32O
+/*
+ * set smallBool
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallBoolt* setInt32SmallBool (smallBoolt* self, int32_t p2);
+/*
+ * set double
+ *
+ * \param
+ * double to store in object
+ */
+smallDoublet* setInt32SmallDouble(smallDoublet* self, int32_t p2);
+/*
+ * set int
+ *
+ * \param
+ * int to store in object
+ */
+smallIntt* setInt32SmallInt (smallIntt* self, int32_t p2);
+/*
+ * set smallString
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallStringt* setInt32SmallString (smallStringt* self, int32_t p2);
+#define setUint32O(self, p2) (self)->f->setUint32(self, p2)
+#define setUint32G setUint32O
+/*
+ * set smallBool
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallBoolt* setUint32SmallBool (smallBoolt* self, uint32_t p2);
+/*
+ * set double
+ *
+ * \param
+ * double to store in object
+ */
+smallDoublet* setUint32SmallDouble(smallDoublet* self, uint32_t p2);
+/*
+ * set int
+ *
+ * \param
+ * int to store in object
+ */
+smallIntt* setUint32SmallInt (smallIntt* self, uint32_t p2);
+/*
+ * set smallString
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallStringt* setUint32SmallString (smallStringt* self, uint32_t p2);
+#define setUint64O(self, p2) (self)->f->setUint64(self, p2)
+#define setUint64G setUint64O
+/*
+ * set smallBool
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallBoolt* setUint64SmallBool (smallBoolt* self, uint64_t p2);
+/*
+ * set double
+ *
+ * \param
+ * double to store in object
+ */
+smallDoublet* setUint64SmallDouble(smallDoublet* self, uint64_t p2);
+/*
+ * set int
+ *
+ * \param
+ * int to store in object
+ */
+smallIntt* setUint64SmallInt (smallIntt* self, uint64_t p2);
+/*
+ * set smallString
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
+ */
+smallStringt* setUint64SmallString (smallStringt* self, uint64_t p2);
+#define equalCharO(self, p2) (self)->f->equalChar(self, p2)
+#define equalCharG equalCharO
+/*
+ * equal
+ * compare self to smallString
+ *
+ * \param
+ * smallString to compare
+ * \return
+ * true the smallStrings have identical content
+ * false they differ
+ */
+bool equalCharSmallString (smallStringt *self, char c);
+#define equalBoolO(self, p2) (self)->f->equalBool(self, p2)
+#define equalBoolG equalBoolO
+#define equalDoubleO(self, p2) (self)->f->equalDouble(self, p2)
+#define equalDoubleG equalDoubleO
+#define equalInt64O(self, p2) (self)->f->equalInt64(self, p2)
+#define equalInt64G equalInt64O
+#define equalInt32O(self, p2) (self)->f->equalInt32(self, p2)
+#define equalInt32G equalInt32O
+#define equalUint32O(self, p2) (self)->f->equalUint32(self, p2)
+#define equalUint32G equalUint32O
+#define equalUint64O(self, p2) (self)->f->equalUint64(self, p2)
+#define equalUint64G equalUint64O
+#define equalSmallDoubleO(self, p2) (self)->f->equalSmallDouble(self, p2)
+#define equalSmallDoubleG equalSmallDoubleO
+#define equalSmallIntO(self, p2) (self)->f->equalSmallInt(self, p2)
+#define equalSmallIntG equalSmallIntO
+#define equalSmallStringO(self, p2) (self)->f->equalSmallString(self, p2)
+#define equalSmallStringG equalSmallStringO
+#define appendFileSmallStringO(self, filePath) (self)->f->appendFileSmallString(self, filePath)
+#define appendFileSmallStringG appendFileSmallStringO
+/*
+ * append bool to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath
+ */
+int appendFileSmallStringSmallBool(smallBoolt *self, smallStringt *filePath);
+/*
+ * append self to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or smallBytes are NULL
+ */
+int appendFileSmallStringSmallBytes(smallBytest *self, smallStringt *filePath);
+/*
+ * append dictionary to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or dict are NULL
+ */
+bool appendFileSmallStringSmallDict(smallDictt *self, smallStringt *filePath);
/*
- * are all elements of type type
+ * append double to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath
*/
-bool areAllEStringSmallArray (smallArrayt *self);
+int appendFileSmallStringSmallDouble(smallDoublet *self, smallStringt *filePath);
/*
- * are all elements of type type
+ * append int to filePath
+ *
+ * \param
+ * filePath
+ * \return
+ * true success
+ * false failed, filePath
*/
-bool areAllEStringSmallArray (smallArrayt *self);
+int appendFileSmallStringSmallInt(smallIntt *self, smallStringt *filePath);
/*
- * are all elements of type type
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
*/
-bool areAllEStringSmallDict (smallDictt *self);
+int appendFileSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
/*
- * are all elements of type type
+ * append json to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or json are NULL
*/
-bool areAllEStringSmallJson (smallJsont *self);
+int appendFileSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
/*
- * are all elements of type type
+ * append string to filePath
+ *
+ * \param
+ * filePath
+ * list
+ * \return
+ * true success
+ * false failed, filePath or string are NULL
*/
-bool areAllEStringSmallJson (smallJsont *self);
-#define areAllEFaststringO(self) (self)->f->areAllEFaststring(self)
-#define areAllEFaststringG areAllEFaststringO
+int appendFileSmallStringSmallString(smallStringt *self, smallStringt *filePath);
+#define equalSmallBoolO(self, value) (self)->f->equalSmallBool(self, value)
+#define equalSmallBoolG equalSmallBoolO
+#define setClassDataFreeO(self, free) (self)->f->setClassDataFree(self, free)
+#define setClassDataFreeG setClassDataFreeO
/*
- * are all elements of type type
+ * set function to free container data in the class
+ *
+ * All smallContainert objects have access to this function
+ *
+ * \param
+ * free user provided function to free the data in the container
*/
-bool areAllEFaststringSmallArray(smallArrayt *self);
+smallContainert* setClassDataFreeSmallContainer (smallContainert *self, dataFreeSmallContainerFt free);
+#define setObjectDataFreeO(self, free) (self)->f->setObjectDataFree(self, free)
+#define setObjectDataFreeG setObjectDataFreeO
/*
- * are all elements of type type
+ * set function to free container data in self
+ *
+ * \param
+ * free user provided function to free the data in the container
*/
-bool areAllEFaststringSmallArray(smallArrayt *self);
+smallContainert* setObjectDataFreeSmallContainer (smallContainert *self, dataFreeSmallContainerFt free);
+#define setClassDataToStringO(self, toString) (self)->f->setClassDataToString(self, toString)
+#define setClassDataToStringG setClassDataToStringO
/*
- * are all elements of type type
+ * set function to stringify container data in the class
+ *
+ * \param
+ * toString user provided function to stringify the data in the container
*/
-bool areAllEFaststringSmallDict(smallDictt *self);
+smallContainert* setClassDataToStringSmallContainer (smallContainert *self, dataToStringSmallContainerFt toString);
+#define setObjectDataToStringO(self, toString) (self)->f->setObjectDataToString(self, toString)
+#define setObjectDataToStringG setObjectDataToStringO
/*
- * are all elements of type type
+ * set function to stringify container data in self
+ *
+ * \param
+ * toString user provided function to stringify the data in the container
*/
-bool areAllEFaststringSmallJson(smallJsont *self);
+smallContainert* setObjectDataToStringSmallContainer (smallContainert *self, dataToStringSmallContainerFt toString);
+#define setClassDataDuplicateO(self, duplicate) (self)->f->setClassDataDuplicate(self, duplicate)
+#define setClassDataDuplicateG setClassDataDuplicateO
/*
- * are all elements of type type
+ * set function to duplicate container data in the class
+ *
+ * \param
+ * duplicate user provided function to duplicate the data in the container
*/
-bool areAllEFaststringSmallJson(smallJsont *self);
-#define areAllEArrayO(self) (self)->f->areAllEArray(self)
-#define areAllEArrayG areAllEArrayO
+smallContainert* setClassDataDuplicateSmallContainer (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+#define setObjectDataDuplicateO(self, duplicate) (self)->f->setObjectDataDuplicate(self, duplicate)
+#define setObjectDataDuplicateG setObjectDataDuplicateO
/*
- * are all elements of type type
+ * set function to duplicate container data in self
+ *
+ * \param
+ * duplicate user provided function to duplicate the data in the container
*/
-bool areAllEArraySmallArray (smallArrayt *self);
+smallContainert* setObjectDataDuplicateSmallContainer (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+#define setCharO(self, key, c) (self)->f->setChar(self, key, c)
+#define setCharG setCharO
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool areAllEArraySmallArray (smallArrayt *self);
+smallDictt* setCharSmallDict (smallDictt *self, const char *key, char c);
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key dictionary key
+ * \param
+ * value an object
*/
-bool areAllEArraySmallDict (smallDictt *self);
+smallJsont* setCharSmallJson (smallJsont *self, const char *key, char c);
/*
- * are all elements of type type
+ * set element
+ *
+//:define pushHelp
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+//:end
+ *
+ * \param
+ * key dictionary key
+ * \param
+ * value an object
*/
-bool areAllEArraySmallJson (smallJsont *self);
+smallJsont* setCharSmallJson (smallJsont *self, const char *key, char c);
/*
- * are all elements of type type
+ * set smallString
+ *
+ * \param
+ * string buffer to store in object (the buffer is duplicated)
*/
-bool areAllEArraySmallJson (smallJsont *self);
-#define areAllEBytesO(self) (self)->f->areAllEBytes(self)
-#define areAllEBytesG areAllEBytesO
+smallStringt* setCharSmallString (smallStringt *self, char c);
+#define setArraycO(self, key, array) (self)->f->setArrayc(self, key, array)
+#define setArraycG setArraycO
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool areAllEBytesSmallArray (smallArrayt *self);
+smallDictt* setArraycSmallDict (smallDictt *self, const char *key, char **array);
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key dictionary key
+ * \param
+ * value an object
*/
-bool areAllEBytesSmallArray (smallArrayt *self);
+smallJsont* setArraycSmallJson (smallJsont *self, const char *key, char **array);
/*
- * are all elements of type type
+ * set element
+ *
+//:define pushHelp
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+//:end
+ *
+ * \param
+ * key dictionary key
+ * \param
+ * value an object
*/
-bool areAllEBytesSmallDict (smallDictt *self);
+smallJsont* setArraycSmallJson (smallJsont *self, const char *key, char **array);
+#define setSmallBytesO(self, key, value) (self)->f->setSmallBytes(self, key, value)
+#define setSmallBytesG setSmallBytesO
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool areAllEBytesSmallJson (smallJsont *self);
+smallDictt* setSmallBytesSmallDict (smallDictt *self, const char *key, smallBytest *value);
/*
- * are all elements of type type
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key dictionary key
+ * \param
+ * value an object
*/
-bool areAllEBytesSmallJson (smallJsont *self);
-#define setInt64O(self, p2) (self)->f->setInt64(self, p2)
-#define setInt64G setInt64O
+smallJsont* setSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
/*
- * set smallBool
+ * set element
+ *
+//:define pushHelp
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallArray has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+//:end
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key dictionary key
+ * \param
+ * value an object
*/
-smallBoolt* setInt64SmallBool (smallBoolt* self, int64_t p2);
+smallJsont* setSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
+#define setKCharO(self, key, value) (self)->f->setKChar(self, key, value)
+#define setKCharG setKCharO
/*
- * set double
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * double to store in object
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallDoublet* setInt64SmallDouble(smallDoublet* self, int64_t p2);
+smallDictt* setKCharSmallDict (smallDictt *self, char key, baset *value);
+#define setUndefinedKCharO(self, key) (self)->f->setUndefinedKChar(self, key)
+#define setUndefinedKCharG setUndefinedKCharO
/*
- * set smallString
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallStringt* setInt64SmallString (smallStringt* self, int64_t p2);
-#define setInt32O(self, p2) (self)->f->setInt32(self, p2)
-#define setInt32G setInt32O
+smallDictt* setUndefinedKCharSmallDict(smallDictt *self, char key);
+#define setBoolKCharO(self, key, value) (self)->f->setBoolKChar(self, key, value)
+#define setBoolKCharG setBoolKCharO
/*
- * set smallBool
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
+ */
+smallDictt* setBoolKCharSmallDict (smallDictt *self, char key, bool value);
+#define setDoubleKCharO(self, key, value) (self)->f->setDoubleKChar(self, key, value)
+#define setDoubleKCharG setDoubleKCharO
+/*
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
+ */
+smallDictt* setDoubleKCharSmallDict (smallDictt *self, char key, double value);
+#define setIntKCharO(self, key, value) (self)->f->setIntKChar(self, key, value)
+#define setIntKCharG setIntKCharO
+/*
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
+ */
+smallDictt* setIntKCharSmallDict (smallDictt *self, char key, int64_t value);
+#define setSKCharO(self, key, string) (self)->f->setSKChar(self, key, string)
+#define setSKCharG setSKCharO
+/*
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
+ */
+smallDictt* setSKCharSmallDict (smallDictt *self, char key, const char *string);
+#define setCharKCharO(self, key, c) (self)->f->setCharKChar(self, key, c)
+#define setCharKCharG setCharKCharO
+/*
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
+ *
+ * \param
+ * key smallDictionary key
+ * \param
+ * value an object
+ */
+smallDictt* setCharKCharSmallDict (smallDictt *self, char key, char c);
+#define setDictKCharO(self, key, dict) (self)->f->setDictKChar(self, key, dict)
+#define setDictKCharG setDictKCharO
+/*
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
*
- * \param
- * string buffer to store in object (the buffer is duplicated)
- */
-smallBoolt* setInt32SmallBool (smallBoolt* self, int32_t p2);
-/*
- * set double
+ * The object is duplicated for:
+ * char *
*
* \param
- * double to store in object
- */
-smallDoublet* setInt32SmallDouble(smallDoublet* self, int32_t p2);
-/*
- * set int
- *
+ * key smallDictionary key
* \param
- * int to store in object
+ * value an object
*/
-smallIntt* setInt32SmallInt (smallIntt* self, int32_t p2);
+smallDictt* setDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
+#define setArrayKCharO(self, key, array) (self)->f->setArrayKChar(self, key, array)
+#define setArrayKCharG setArrayKCharO
/*
- * set smallString
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallStringt* setInt32SmallString (smallStringt* self, int32_t p2);
-#define setUint32O(self, p2) (self)->f->setUint32(self, p2)
-#define setUint32G setUint32O
+smallDictt* setArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
+#define setArraycKCharO(self, key, array) (self)->f->setArraycKChar(self, key, array)
+#define setArraycKCharG setArraycKCharO
/*
- * set smallBool
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallBoolt* setUint32SmallBool (smallBoolt* self, uint32_t p2);
+smallDictt* setArraycKCharSmallDict (smallDictt *self, char key, char **array);
+#define setSmallBoolKCharO(self, key, value) (self)->f->setSmallBoolKChar(self, key, value)
+#define setSmallBoolKCharG setSmallBoolKCharO
/*
- * set double
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * double to store in object
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallDoublet* setUint32SmallDouble(smallDoublet* self, uint32_t p2);
+smallDictt* setSmallBoolKCharSmallDict (smallDictt *self, char key, smallBoolt *value);
+#define setSmallBytesKCharO(self, key, value) (self)->f->setSmallBytesKChar(self, key, value)
+#define setSmallBytesKCharG setSmallBytesKCharO
/*
- * set int
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * int to store in object
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallIntt* setUint32SmallInt (smallIntt* self, uint32_t p2);
+smallDictt* setSmallBytesKCharSmallDict (smallDictt *self, char key, smallBytest *value);
+#define setSmallDoubleKCharO(self, key, value) (self)->f->setSmallDoubleKChar(self, key, value)
+#define setSmallDoubleKCharG setSmallDoubleKCharO
/*
- * set smallString
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallStringt* setUint32SmallString (smallStringt* self, uint32_t p2);
-#define setUint64O(self, p2) (self)->f->setUint64(self, p2)
-#define setUint64G setUint64O
+smallDictt* setSmallDoubleKCharSmallDict (smallDictt *self, char key, smallDoublet *value);
+#define setSmallIntKCharO(self, key, value) (self)->f->setSmallIntKChar(self, key, value)
+#define setSmallIntKCharG setSmallIntKCharO
/*
- * set smallBool
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallBoolt* setUint64SmallBool (smallBoolt* self, uint64_t p2);
+smallDictt* setSmallIntKCharSmallDict (smallDictt *self, char key, smallIntt *value);
+#define setSmallJsonKCharO(self, key, value) (self)->f->setSmallJsonKChar(self, key, value)
+#define setSmallJsonKCharG setSmallJsonKCharO
/*
- * set double
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * double to store in object
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallDoublet* setUint64SmallDouble(smallDoublet* self, uint64_t p2);
+smallDictt* setSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *value);
+#define setSmallStringKCharO(self, key, string) (self)->f->setSmallStringKChar(self, key, string)
+#define setSmallStringKCharG setSmallStringKCharO
/*
- * set int
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * int to store in object
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallIntt* setUint64SmallInt (smallIntt* self, uint64_t p2);
+smallDictt* setSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
+#define setSmallContainerKCharO(self, key, container) (self)->f->setSmallContainerKChar(self, key, container)
+#define setSmallContainerKCharG setSmallContainerKCharO
/*
- * set smallString
+ * set element
+ *
+ * When the sObject pointer is updated by realloc, the sObject
+ * pointer in the smallDict has to be updated with setP.
+ * The operations reallocating the sObjects are:
+ * smallDict: push, set, trim, merge, append
+ * smallArray: push, prepend
+ * smallBytes: push, pushBuffer
+ * smallJson: push, set
+ * smallString: append, prepend, replace, intTo, insert, color, readFile
+ *
+ * The object is duplicated for:
+ * char *
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallStringt* setUint64SmallString (smallStringt* self, uint64_t p2);
-#define equalCharO(self, p2) (self)->f->equalChar(self, p2)
-#define equalCharG equalCharO
+smallDictt* setSmallContainerKCharSmallDict(smallDictt *self, char key, smallContainert *container);
+#define setNFreeArraycO(self, key, array) (self)->f->setNFreeArrayc(self, key, array)
+#define setNFreeArraycG setNFreeArraycO
/*
- * equal
- * compare self to smallString
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * smallString to compare
- * \return
- * true the smallStrings have identical content
- * false they differ
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool equalCharSmallString (smallStringt *self, char c);
-#define equalBoolO(self, p2) (self)->f->equalBool(self, p2)
-#define equalBoolG equalBoolO
-#define equalDoubleO(self, p2) (self)->f->equalDouble(self, p2)
-#define equalDoubleG equalDoubleO
-#define equalInt64O(self, p2) (self)->f->equalInt64(self, p2)
-#define equalInt64G equalInt64O
-#define equalInt32O(self, p2) (self)->f->equalInt32(self, p2)
-#define equalInt32G equalInt32O
-#define equalUint32O(self, p2) (self)->f->equalUint32(self, p2)
-#define equalUint32G equalUint32O
-#define equalUint64O(self, p2) (self)->f->equalUint64(self, p2)
-#define equalUint64G equalUint64O
-#define equalSmallDoubleO(self, p2) (self)->f->equalSmallDouble(self, p2)
-#define equalSmallDoubleG equalSmallDoubleO
-#define equalSmallIntO(self, p2) (self)->f->equalSmallInt(self, p2)
-#define equalSmallIntG equalSmallIntO
-#define equalSmallStringO(self, p2) (self)->f->equalSmallString(self, p2)
-#define equalSmallStringG equalSmallStringO
-#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
-#define appendFileG appendFileO
+smallDictt* setNFreeArraycSmallDict (smallDictt *self, const char *key, char **array);
/*
- * append bool to filePath
+ * set element and free
+ *
+ * value is freed at the end of the function
+ * Example: when setting a string is copied to a smallStringt and then freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallBool(smallBoolt *self, const char *filePath);
+smallJsont* setNFreeArraycSmallJson (smallJsont *self, const char *key, char **array);
/*
- * append self to filePath
+ * set element and free
+ *
+ * value is freed at the end of the function
+ * Example: when setting a string is copied to a smallStringt and then freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or smallBytes are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallBytes(smallBytest *self, const char *filePath);
+smallJsont* setNFreeArraycSmallJson (smallJsont *self, const char *key, char **array);
+#define setNFreeSmallBytesO(self, key, value) (self)->f->setNFreeSmallBytes(self, key, value)
+#define setNFreeSmallBytesG setNFreeSmallBytesO
/*
- * append dictionary to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or dict are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool appendFileSmallDict (smallDictt *self, const char *filePath);
+smallDictt* setNFreeSmallBytesSmallDict (smallDictt *self, const char *key, smallBytest *value);
/*
- * append double to filePath
+ * set element and free
+ *
+ * value is freed at the end of the function
+ * Example: when setting a string is copied to a smallStringt and then freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallDouble(smallDoublet *self, const char *filePath);
+smallJsont* setNFreeSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
/*
- * append int to filePath
+ * set element and free
+ *
+ * value is freed at the end of the function
+ * Example: when setting a string is copied to a smallStringt and then freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallInt(smallIntt *self, const char *filePath);
+smallJsont* setNFreeSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
+#define setNFreeKCharO(self, key, value) (self)->f->setNFreeKChar(self, key, value)
+#define setNFreeKCharG setNFreeKCharO
/*
- * append json to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or json are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallJson (smallJsont *self, const char *filePath);
+smallDictt* setNFreeKCharSmallDict (smallDictt *self, char key, baset *value);
+#define setNFreeUndefinedKCharO(self, key, undefined) (self)->f->setNFreeUndefinedKChar(self, key, undefined)
+#define setNFreeUndefinedKCharG setNFreeUndefinedKCharO
/*
- * append json to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or json are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallJson (smallJsont *self, const char *filePath);
+smallDictt* setNFreeUndefinedKCharSmallDict(smallDictt *self, char key, undefinedt *undefined);
+#define setNFreeSKCharO(self, key, string) (self)->f->setNFreeSKChar(self, key, string)
+#define setNFreeSKCharG setNFreeSKCharO
/*
- * append string to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or string are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallString(smallStringt *self, const char *filePath);
+smallDictt* setNFreeSKCharSmallDict (smallDictt *self, char key, char *string);
+#define setNFreeDictKCharO(self, key, dict) (self)->f->setNFreeDictKChar(self, key, dict)
+#define setNFreeDictKCharG setNFreeDictKCharO
/*
- * append string to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or string are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallString(smallStringt *self, smallStringt *filePath);
-#define appendFileSmallStringO(self, filePath) (self)->f->appendFileSmallString(self, filePath)
-#define appendFileSmallStringG appendFileSmallStringO
+smallDictt* setNFreeDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
+#define setNFreeArrayKCharO(self, key, array) (self)->f->setNFreeArrayKChar(self, key, array)
+#define setNFreeArrayKCharG setNFreeArrayKCharO
/*
- * append bool to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallBool(smallBoolt *self, smallStringt *filePath);
+smallDictt* setNFreeArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
+#define setNFreeArraycKCharO(self, key, array) (self)->f->setNFreeArraycKChar(self, key, array)
+#define setNFreeArraycKCharG setNFreeArraycKCharO
/*
- * append self to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or smallBytes are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallBytes(smallBytest *self, smallStringt *filePath);
+smallDictt* setNFreeArraycKCharSmallDict (smallDictt *self, char key, char **array);
+#define setNFreeSmallBoolKCharO(self, key, value) (self)->f->setNFreeSmallBoolKChar(self, key, value)
+#define setNFreeSmallBoolKCharG setNFreeSmallBoolKCharO
/*
- * append dictionary to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or dict are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-bool appendFileSmallStringSmallDict(smallDictt *self, smallStringt *filePath);
+smallDictt* setNFreeSmallBoolKCharSmallDict (smallDictt *self, char key, smallBoolt *value);
+#define setNFreeSmallBytesKCharO(self, key, value) (self)->f->setNFreeSmallBytesKChar(self, key, value)
+#define setNFreeSmallBytesKCharG setNFreeSmallBytesKCharO
/*
- * append double to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallDouble(smallDoublet *self, smallStringt *filePath);
+smallDictt* setNFreeSmallBytesKCharSmallDict (smallDictt *self, char key, smallBytest *value);
+#define setNFreeSmallDoubleKCharO(self, key, value) (self)->f->setNFreeSmallDoubleKChar(self, key, value)
+#define setNFreeSmallDoubleKCharG setNFreeSmallDoubleKCharO
/*
- * append int to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * \return
- * true success
- * false failed, filePath
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallInt(smallIntt *self, smallStringt *filePath);
+smallDictt* setNFreeSmallDoubleKCharSmallDict (smallDictt *self, char key, smallDoublet *value);
+#define setNFreeSmallIntKCharO(self, key, value) (self)->f->setNFreeSmallIntKChar(self, key, value)
+#define setNFreeSmallIntKCharG setNFreeSmallIntKCharO
/*
- * append json to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or json are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+smallDictt* setNFreeSmallIntKCharSmallDict (smallDictt *self, char key, smallIntt *value);
+#define setNFreeSmallJsonKCharO(self, key, value) (self)->f->setNFreeSmallJsonKChar(self, key, value)
+#define setNFreeSmallJsonKCharG setNFreeSmallJsonKCharO
/*
- * append json to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or json are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallJson(smallJsont *self, smallStringt *filePath);
+smallDictt* setNFreeSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *value);
+#define setNFreeSmallStringKCharO(self, key, string) (self)->f->setNFreeSmallStringKChar(self, key, string)
+#define setNFreeSmallStringKCharG setNFreeSmallStringKCharO
/*
- * append string to filePath
+ * set element and free
+ *
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * filePath
- * list
- * \return
- * true success
- * false failed, filePath or string are NULL
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-int appendFileSmallStringSmallString(smallStringt *self, smallStringt *filePath);
-#define equalSmallBoolO(self, value) (self)->f->equalSmallBool(self, value)
-#define equalSmallBoolG equalSmallBoolO
-#define setClassDataFreeO(self, free) (self)->f->setClassDataFree(self, free)
-#define setClassDataFreeG setClassDataFreeO
+smallDictt* setNFreeSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
+#define setNFreeSmallContainerKCharO(self, key, container) (self)->f->setNFreeSmallContainerKChar(self, key, container)
+#define setNFreeSmallContainerKCharG setNFreeSmallContainerKCharO
/*
- * set function to free container data in the class
+ * set element and free
*
- * All smallContainert objects have access to this function
+ * value container is freed at the end of the function
+ * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
*
* \param
- * free user provided function to free the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setClassDataFreeSmallContainer (smallContainert *self, dataFreeSmallContainerFt free);
-#define setObjectDataFreeO(self, free) (self)->f->setObjectDataFree(self, free)
-#define setObjectDataFreeG setObjectDataFreeO
+smallDictt* setNFreeSmallContainerKCharSmallDict(smallDictt *self, char key, smallContainert *container);
+#define setPSmallJsonO(self, key, json) (self)->f->setPSmallJson(self, key, json)
+#define setPSmallJsonG setPSmallJsonO
/*
- * set function to free container data in self
+ * set pointer in element
*
* \param
- * free user provided function to free the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setObjectDataFreeSmallContainer (smallContainert *self, dataFreeSmallContainerFt free);
-#define setClassDataToStringO(self, toString) (self)->f->setClassDataToString(self, toString)
-#define setClassDataToStringG setClassDataToStringO
+smallDictt* setPSmallJsonSmallDict (smallDictt *self, const char *key, smallJsont *json);
/*
- * set function to stringify container data in the class
+ * set pointer in element
*
* \param
- * toString user provided function to stringify the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setClassDataToStringSmallContainer (smallContainert *self, dataToStringSmallContainerFt toString);
-#define setObjectDataToStringO(self, toString) (self)->f->setObjectDataToString(self, toString)
-#define setObjectDataToStringG setObjectDataToStringO
+smallJsont* setPSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
/*
- * set function to stringify container data in self
+ * set pointer in element
*
* \param
- * toString user provided function to stringify the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setObjectDataToStringSmallContainer (smallContainert *self, dataToStringSmallContainerFt toString);
-#define setClassDataDuplicateO(self, duplicate) (self)->f->setClassDataDuplicate(self, duplicate)
-#define setClassDataDuplicateG setClassDataDuplicateO
+smallJsont* setPSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
+#define setNFreePSmallJsonO(self, key, json) (self)->f->setNFreePSmallJson(self, key, json)
+#define setNFreePSmallJsonG setNFreePSmallJsonO
/*
- * set function to duplicate container data in the class
+ * set pointer in element
*
* \param
- * duplicate user provided function to duplicate the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setClassDataDuplicateSmallContainer (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
-#define setObjectDataDuplicateO(self, duplicate) (self)->f->setObjectDataDuplicate(self, duplicate)
-#define setObjectDataDuplicateG setObjectDataDuplicateO
+smallDictt* setNFreePSmallJsonSmallDict (smallDictt *self, const char *key, smallJsont *json);
/*
- * set function to duplicate container data in self
+ * set pointer in element
*
* \param
- * duplicate user provided function to duplicate the data in the container
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallContainert* setObjectDataDuplicateSmallContainer (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
-#define setCharO(self, key, c) (self)->f->setChar(self, key, c)
-#define setCharG setCharO
+smallJsont* setNFreePSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
* key smallDictionary key
* \param
* value an object
*/
-smallDictt* setCharSmallDict (smallDictt *self, const char *key, char c);
+smallJsont* setNFreePSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
+#define setPArrayKCharO(self, key, array) (self)->f->setPArrayKChar(self, key, array)
+#define setPArrayKCharG setPArrayKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
- * key dictionary key
+ * key smallDictionary key
* \param
* value an object
*/
-smallJsont* setCharSmallJson (smallJsont *self, const char *key, char c);
+smallDictt* setPArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
+#define setPDictKCharO(self, key, dict) (self)->f->setPDictKChar(self, key, dict)
+#define setPDictKCharG setPDictKCharO
/*
- * set element
- *
-//:define pushHelp
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
-//:end
+ * set pointer in element
*
* \param
- * key dictionary key
+ * key smallDictionary key
* \param
* value an object
*/
-smallJsont* setCharSmallJson (smallJsont *self, const char *key, char c);
+smallDictt* setPDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
+#define setPSmallJsonKCharO(self, key, json) (self)->f->setPSmallJsonKChar(self, key, json)
+#define setPSmallJsonKCharG setPSmallJsonKCharO
/*
- * set smallString
+ * set pointer in element
*
* \param
- * string buffer to store in object (the buffer is duplicated)
+ * key smallDictionary key
+ * \param
+ * value an object
*/
-smallStringt* setCharSmallString (smallStringt *self, char c);
-#define setArraycO(self, key, array) (self)->f->setArrayc(self, key, array)
-#define setArraycG setArraycO
+smallDictt* setPSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *json);
+#define setPSmallStringKCharO(self, key, string) (self)->f->setPSmallStringKChar(self, key, string)
+#define setPSmallStringKCharG setPSmallStringKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
* key smallDictionary key
* \param
* value an object
*/
-smallDictt* setArraycSmallDict (smallDictt *self, const char *key, char **array);
+smallDictt* setPSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
+#define setNFreePArrayKCharO(self, key, array) (self)->f->setNFreePArrayKChar(self, key, array)
+#define setNFreePArrayKCharG setNFreePArrayKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
- * key dictionary key
+ * key smallDictionary key
* \param
* value an object
*/
-smallJsont* setArraycSmallJson (smallJsont *self, const char *key, char **array);
+smallDictt* setNFreePArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
+#define setNFreePDictKCharO(self, key, dict) (self)->f->setNFreePDictKChar(self, key, dict)
+#define setNFreePDictKCharG setNFreePDictKCharO
/*
- * set element
- *
-//:define pushHelp
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
-//:end
+ * set pointer in element
*
* \param
- * key dictionary key
+ * key smallDictionary key
* \param
* value an object
*/
-smallJsont* setArraycSmallJson (smallJsont *self, const char *key, char **array);
-#define setSmallBytesO(self, key, value) (self)->f->setSmallBytes(self, key, value)
-#define setSmallBytesG setSmallBytesO
+smallDictt* setNFreePDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
+#define setNFreePSmallJsonKCharO(self, key, json) (self)->f->setNFreePSmallJsonKChar(self, key, json)
+#define setNFreePSmallJsonKCharG setNFreePSmallJsonKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
* key smallDictionary key
* \param
* value an object
*/
-smallDictt* setSmallBytesSmallDict (smallDictt *self, const char *key, smallBytest *value);
+smallDictt* setNFreePSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *json);
+#define setNFreePSmallStringKCharO(self, key, string) (self)->f->setNFreePSmallStringKChar(self, key, string)
+#define setNFreePSmallStringKCharG setNFreePSmallStringKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * set pointer in element
*
* \param
- * key dictionary key
+ * key smallDictionary key
* \param
* value an object
*/
-smallJsont* setSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
+smallDictt* setNFreePSmallStringKCharSmallDict(smallDictt *self, char key, smallStringt *string);
+#define getSmallBytesO(self, key) (self)->f->getSmallBytes(self, key)
+#define getSmallBytesG getSmallBytesO
/*
- * set element
+ * get element
*
-//:define pushHelp
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallArray has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+smallBytest* getSmallBytesSmallDict (smallDictt *self, const char *key);
+/*
+ * get element
*
- * The object is duplicated for:
- * char *
-//:end
+ * \param
+ * key dictionary key
+ * \return
+ * object or NULL
+ */
+smallBytest* getSmallBytesSmallJson (smallJsont *self, const char *key);
+/*
+ * get element
*
* \param
* key dictionary key
+ * \return
+ * object or NULL
+ */
+smallBytest* getSmallBytesSmallJson (smallJsont *self, const char *key);
+#define getKCharO(self, key) (self)->f->getKChar(self, key)
+#define getKCharG getKCharO
+/*
+ * get element
+ *
* \param
- * value an object
+ * key smallDictionary key
+ * \return
+ * object or NULL
*/
-smallJsont* setSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
-#define setKCharO(self, key, value) (self)->f->setKChar(self, key, value)
-#define setKCharG setKCharO
+baset* getKCharSmallDict (smallDictt *self, char key);
+#define getUndefinedKCharO(self, key) (self)->f->getUndefinedKChar(self, key)
+#define getUndefinedKCharG getUndefinedKCharO
/*
- * set element
+ * get element
*
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+undefinedt* getUndefinedKCharSmallDict (smallDictt *self, char key);
+#define getBoolKCharO(self, key) (self)->f->getBoolKChar(self, key)
+#define getBoolKCharG getBoolKCharO
+/*
+ * get element
*
- * The object is duplicated for:
- * char *
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+bool getBoolKCharSmallDict (smallDictt *self, char key);
+#define getBoolPKCharO(self, key) (self)->f->getBoolPKChar(self, key)
+#define getBoolPKCharG getBoolPKCharO
+/*
+ * get element
*
* \param
* key smallDictionary key
+ * \return
+ * object or NULL
+ */
+bool* getBoolPKCharSmallDict (smallDictt *self, char key);
+#define getDoubleKCharO(self, key) (self)->f->getDoubleKChar(self, key)
+#define getDoubleKCharG getDoubleKCharO
+/*
+ * get element
+ *
* \param
- * value an object
+ * key smallDictionary key
+ * \return
+ * object or NULL
*/
-smallDictt* setKCharSmallDict (smallDictt *self, char key, baset *value);
-#define setUndefinedKCharO(self, key) (self)->f->setUndefinedKChar(self, key)
-#define setUndefinedKCharG setUndefinedKCharO
+double getDoubleKCharSmallDict (smallDictt *self, char key);
+#define getDoublePKCharO(self, key) (self)->f->getDoublePKChar(self, key)
+#define getDoublePKCharG getDoublePKCharO
/*
- * set element
+ * get element
*
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+double* getDoublePKCharSmallDict (smallDictt *self, char key);
+#define getIntKCharO(self, key) (self)->f->getIntKChar(self, key)
+#define getIntKCharG getIntKCharO
+/*
+ * get element
*
- * The object is duplicated for:
- * char *
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+int64_t getIntKCharSmallDict (smallDictt *self, char key);
+#define getIntPKCharO(self, key) (self)->f->getIntPKChar(self, key)
+#define getIntPKCharG getIntPKCharO
+/*
+ * get element
*
* \param
* key smallDictionary key
+ * \return
+ * object or NULL
+ */
+int64_t* getIntPKCharSmallDict (smallDictt *self, char key);
+#define getInt32KCharO(self, key) (self)->f->getInt32KChar(self, key)
+#define getInt32KCharG getInt32KCharO
+/*
+ * get element
+ *
* \param
- * value an object
+ * key smallDictionary key
+ * \return
+ * object or NULL
*/
-smallDictt* setUndefinedKCharSmallDict(smallDictt *self, char key);
-#define setBoolKCharO(self, key, value) (self)->f->setBoolKChar(self, key, value)
-#define setBoolKCharG setBoolKCharO
+int32_t getInt32KCharSmallDict (smallDictt *self, char key);
+#define getInt32PKCharO(self, key) (self)->f->getInt32PKChar(self, key)
+#define getInt32PKCharG getInt32PKCharO
/*
- * set element
+ * get element
*
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+int32_t* getInt32PKCharSmallDict (smallDictt *self, char key);
+#define getUintKCharO(self, key) (self)->f->getUintKChar(self, key)
+#define getUintKCharG getUintKCharO
+/*
+ * get element
*
- * The object is duplicated for:
- * char *
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+uint64_t getUintKCharSmallDict (smallDictt *self, char key);
+#define getUintPKCharO(self, key) (self)->f->getUintPKChar(self, key)
+#define getUintPKCharG getUintPKCharO
+/*
+ * get element
*
* \param
* key smallDictionary key
+ * \return
+ * object or NULL
+ */
+uint64_t* getUintPKCharSmallDict (smallDictt *self, char key);
+#define getUint32KCharO(self, key) (self)->f->getUint32KChar(self, key)
+#define getUint32KCharG getUint32KCharO
+/*
+ * get element
+ *
* \param
- * value an object
+ * key smallDictionary key
+ * \return
+ * object or NULL
*/
-smallDictt* setBoolKCharSmallDict (smallDictt *self, char key, bool value);
-#define setDoubleKCharO(self, key, value) (self)->f->setDoubleKChar(self, key, value)
-#define setDoubleKCharG setDoubleKCharO
+uint32_t getUint32KCharSmallDict (smallDictt *self, char key);
+#define getUint32PKCharO(self, key) (self)->f->getUint32PKChar(self, key)
+#define getUint32PKCharG getUint32PKCharO
/*
- * set element
+ * get element
*
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+uint32_t* getUint32PKCharSmallDict (smallDictt *self, char key);
+#define getSKCharO(self, key) (self)->f->getSKChar(self, key)
+#define getSKCharG getSKCharO
+/*
+ * get element
*
- * The object is duplicated for:
- * char *
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+char* getSKCharSmallDict (smallDictt *self, char key);
+#define getDictKCharO(self, key) (self)->f->getDictKChar(self, key)
+#define getDictKCharG getDictKCharO
+/*
+ * get element
+ *
+ * \param
+ * key smallDictionary key
+ * \return
+ * object or NULL
+ */
+smallDictt* getDictKCharSmallDict (smallDictt *self, char key);
+#define getArrayKCharO(self, key) (self)->f->getArrayKChar(self, key)
+#define getArrayKCharG getArrayKCharO
+/*
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setDoubleKCharSmallDict (smallDictt *self, char key, double value);
-#define setIntKCharO(self, key, value) (self)->f->setIntKChar(self, key, value)
-#define setIntKCharG setIntKCharO
+smallArrayt* getArrayKCharSmallDict (smallDictt *self, char key);
+#define getSmallBoolKCharO(self, key) (self)->f->getSmallBoolKChar(self, key)
+#define getSmallBoolKCharG getSmallBoolKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setIntKCharSmallDict (smallDictt *self, char key, int64_t value);
-#define setSKCharO(self, key, string) (self)->f->setSKChar(self, key, string)
-#define setSKCharG setSKCharO
+smallBoolt* getSmallBoolKCharSmallDict (smallDictt *self, char key);
+#define getSmallBytesKCharO(self, key) (self)->f->getSmallBytesKChar(self, key)
+#define getSmallBytesKCharG getSmallBytesKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setSKCharSmallDict (smallDictt *self, char key, const char *string);
-#define setCharKCharO(self, key, c) (self)->f->setCharKChar(self, key, c)
-#define setCharKCharG setCharKCharO
+smallBytest* getSmallBytesKCharSmallDict (smallDictt *self, char key);
+#define getSmallDoubleKCharO(self, key) (self)->f->getSmallDoubleKChar(self, key)
+#define getSmallDoubleKCharG getSmallDoubleKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setCharKCharSmallDict (smallDictt *self, char key, char c);
-#define setDictKCharO(self, key, dict) (self)->f->setDictKChar(self, key, dict)
-#define setDictKCharG setDictKCharO
+smallDoublet* getSmallDoubleKCharSmallDict (smallDictt *self, char key);
+#define getSmallIntKCharO(self, key) (self)->f->getSmallIntKChar(self, key)
+#define getSmallIntKCharG getSmallIntKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
-#define setArrayKCharO(self, key, array) (self)->f->setArrayKChar(self, key, array)
-#define setArrayKCharG setArrayKCharO
+smallIntt* getSmallIntKCharSmallDict (smallDictt *self, char key);
+#define getSmallJsonKCharO(self, key) (self)->f->getSmallJsonKChar(self, key)
+#define getSmallJsonKCharG getSmallJsonKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
-#define setArraycKCharO(self, key, array) (self)->f->setArraycKChar(self, key, array)
-#define setArraycKCharG setArraycKCharO
+smallJsont* getSmallJsonKCharSmallDict (smallDictt *self, char key);
+#define getSmallStringKCharO(self, key) (self)->f->getSmallStringKChar(self, key)
+#define getSmallStringKCharG getSmallStringKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setArraycKCharSmallDict (smallDictt *self, char key, char **array);
-#define setSmallBoolKCharO(self, key, value) (self)->f->setSmallBoolKChar(self, key, value)
-#define setSmallBoolKCharG setSmallBoolKCharO
+smallStringt* getSmallStringKCharSmallDict (smallDictt *self, char key);
+#define getVoidKCharO(self, key) (self)->f->getVoidKChar(self, key)
+#define getVoidKCharG getVoidKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setSmallBoolKCharSmallDict (smallDictt *self, char key, smallBoolt *value);
-#define setSmallBytesKCharO(self, key, value) (self)->f->setSmallBytesKChar(self, key, value)
-#define setSmallBytesKCharG setSmallBytesKCharO
+void* getVoidKCharSmallDict (smallDictt *self, char key);
+#define getSmallContainerKCharO(self, key) (self)->f->getSmallContainerKChar(self, key)
+#define getSmallContainerKCharG getSmallContainerKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * object or NULL
*/
-smallDictt* setSmallBytesKCharSmallDict (smallDictt *self, char key, smallBytest *value);
-#define setSmallDoubleKCharO(self, key, value) (self)->f->setSmallDoubleKChar(self, key, value)
-#define setSmallDoubleKCharG setSmallDoubleKCharO
+smallContainert* getSmallContainerKCharSmallDict(smallDictt *self, char key);
+#define getNDupSmallBytesO(self, key) (self)->f->getNDupSmallBytes(self, key)
+#define getNDupSmallBytesG getNDupSmallBytesO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setSmallDoubleKCharSmallDict (smallDictt *self, char key, smallDoublet *value);
-#define setSmallIntKCharO(self, key, value) (self)->f->setSmallIntKChar(self, key, value)
-#define setSmallIntKCharG setSmallIntKCharO
+smallBytest* getNDupSmallBytesSmallDict (smallDictt *self, const char *key);
/*
- * set element
+ * get duplicated object
*
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
+ * \param
+ * key dictionary key
+ * \return
+ * object or NULL
+ */
+smallBytest* getNDupSmallBytesSmallJson (smallJsont *self, const char *key);
+/*
+ * get duplicated object
*
- * The object is duplicated for:
- * char *
+ * \param
+ * key dictionary key
+ * \return
+ * object or NULL
+ */
+smallBytest* getNDupSmallBytesSmallJson (smallJsont *self, const char *key);
+#define getNDupKCharO(self, key) (self)->f->getNDupKChar(self, key)
+#define getNDupKCharG getNDupKCharO
+/*
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setSmallIntKCharSmallDict (smallDictt *self, char key, smallIntt *value);
-#define setSmallJsonKCharO(self, key, value) (self)->f->setSmallJsonKChar(self, key, value)
-#define setSmallJsonKCharG setSmallJsonKCharO
+baset* getNDupKCharSmallDict (smallDictt *self, char key);
+#define getNDupUndefinedKCharO(self, key) (self)->f->getNDupUndefinedKChar(self, key)
+#define getNDupUndefinedKCharG getNDupUndefinedKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *value);
-#define setSmallStringKCharO(self, key, string) (self)->f->setSmallStringKChar(self, key, string)
-#define setSmallStringKCharG setSmallStringKCharO
+undefinedt* getNDupUndefinedKCharSmallDict (smallDictt *self, char key);
+#define getNDupBoolKCharO(self, key) (self)->f->getNDupBoolKChar(self, key)
+#define getNDupBoolKCharG getNDupBoolKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
-#define setSmallContainerKCharO(self, key, container) (self)->f->setSmallContainerKChar(self, key, container)
-#define setSmallContainerKCharG setSmallContainerKCharO
+bool getNDupBoolKCharSmallDict (smallDictt *self, char key);
+#define getNDupDoubleKCharO(self, key) (self)->f->getNDupDoubleKChar(self, key)
+#define getNDupDoubleKCharG getNDupDoubleKCharO
/*
- * set element
- *
- * When the sObject pointer is updated by realloc, the sObject
- * pointer in the smallDict has to be updated with setP.
- * The operations reallocating the sObjects are:
- * smallDict: push, set, trim, merge, append
- * smallArray: push, prepend
- * smallBytes: push, pushBuffer
- * smallJson: push, set
- * smallString: append, prepend, replace, intTo, insert, color, readFile
- *
- * The object is duplicated for:
- * char *
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setSmallContainerKCharSmallDict(smallDictt *self, char key, smallContainert *container);
-#define setNFreeArraycO(self, key, array) (self)->f->setNFreeArrayc(self, key, array)
-#define setNFreeArraycG setNFreeArraycO
+double getNDupDoubleKCharSmallDict (smallDictt *self, char key);
+#define getNDupIntKCharO(self, key) (self)->f->getNDupIntKChar(self, key)
+#define getNDupIntKCharG getNDupIntKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeArraycSmallDict (smallDictt *self, const char *key, char **array);
+int64_t getNDupIntKCharSmallDict (smallDictt *self, char key);
+#define getNDupInt32KCharO(self, key) (self)->f->getNDupInt32KChar(self, key)
+#define getNDupInt32KCharG getNDupInt32KCharO
/*
- * set element and free
- *
- * value is freed at the end of the function
- * Example: when setting a string is copied to a smallStringt and then freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallJsont* setNFreeArraycSmallJson (smallJsont *self, const char *key, char **array);
+int32_t getNDupInt32KCharSmallDict (smallDictt *self, char key);
+#define getNDupUintKCharO(self, key) (self)->f->getNDupUintKChar(self, key)
+#define getNDupUintKCharG getNDupUintKCharO
/*
- * set element and free
- *
- * value is freed at the end of the function
- * Example: when setting a string is copied to a smallStringt and then freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallJsont* setNFreeArraycSmallJson (smallJsont *self, const char *key, char **array);
-#define setNFreeSmallBytesO(self, key, value) (self)->f->setNFreeSmallBytes(self, key, value)
-#define setNFreeSmallBytesG setNFreeSmallBytesO
+uint64_t getNDupUintKCharSmallDict (smallDictt *self, char key);
+#define getNDupUint32KCharO(self, key) (self)->f->getNDupUint32KChar(self, key)
+#define getNDupUint32KCharG getNDupUint32KCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeSmallBytesSmallDict (smallDictt *self, const char *key, smallBytest *value);
+uint32_t getNDupUint32KCharSmallDict (smallDictt *self, char key);
+#define getNDupSKCharO(self, key) (self)->f->getNDupSKChar(self, key)
+#define getNDupSKCharG getNDupSKCharO
/*
- * set element and free
- *
- * value is freed at the end of the function
- * Example: when setting a string is copied to a smallStringt and then freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallJsont* setNFreeSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
+char* getNDupSKCharSmallDict (smallDictt *self, char key);
+#define getNDupDictKCharO(self, key) (self)->f->getNDupDictKChar(self, key)
+#define getNDupDictKCharG getNDupDictKCharO
/*
- * set element and free
- *
- * value is freed at the end of the function
- * Example: when setting a string is copied to a smallStringt and then freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallJsont* setNFreeSmallBytesSmallJson (smallJsont *self, const char *key, smallBytest *value);
-#define setNFreeKCharO(self, key, value) (self)->f->setNFreeKChar(self, key, value)
-#define setNFreeKCharG setNFreeKCharO
+smallDictt* getNDupDictKCharSmallDict (smallDictt *self, char key);
+#define getNDupArrayKCharO(self, key) (self)->f->getNDupArrayKChar(self, key)
+#define getNDupArrayKCharG getNDupArrayKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeKCharSmallDict (smallDictt *self, char key, baset *value);
-#define setNFreeUndefinedKCharO(self, key, undefined) (self)->f->setNFreeUndefinedKChar(self, key, undefined)
-#define setNFreeUndefinedKCharG setNFreeUndefinedKCharO
+smallArrayt* getNDupArrayKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallBoolKCharO(self, key) (self)->f->getNDupSmallBoolKChar(self, key)
+#define getNDupSmallBoolKCharG getNDupSmallBoolKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeUndefinedKCharSmallDict(smallDictt *self, char key, undefinedt *undefined);
-#define setNFreeSKCharO(self, key, string) (self)->f->setNFreeSKChar(self, key, string)
-#define setNFreeSKCharG setNFreeSKCharO
+smallBoolt* getNDupSmallBoolKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallBytesKCharO(self, key) (self)->f->getNDupSmallBytesKChar(self, key)
+#define getNDupSmallBytesKCharG getNDupSmallBytesKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeSKCharSmallDict (smallDictt *self, char key, char *string);
-#define setNFreeDictKCharO(self, key, dict) (self)->f->setNFreeDictKChar(self, key, dict)
-#define setNFreeDictKCharG setNFreeDictKCharO
+smallBytest* getNDupSmallBytesKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallDoubleKCharO(self, key) (self)->f->getNDupSmallDoubleKChar(self, key)
+#define getNDupSmallDoubleKCharG getNDupSmallDoubleKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
-#define setNFreeArrayKCharO(self, key, array) (self)->f->setNFreeArrayKChar(self, key, array)
-#define setNFreeArrayKCharG setNFreeArrayKCharO
+smallDoublet* getNDupSmallDoubleKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallIntKCharO(self, key) (self)->f->getNDupSmallIntKChar(self, key)
+#define getNDupSmallIntKCharG getNDupSmallIntKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
-#define setNFreeArraycKCharO(self, key, array) (self)->f->setNFreeArraycKChar(self, key, array)
-#define setNFreeArraycKCharG setNFreeArraycKCharO
+smallIntt* getNDupSmallIntKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallJsonKCharO(self, key) (self)->f->getNDupSmallJsonKChar(self, key)
+#define getNDupSmallJsonKCharG getNDupSmallJsonKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeArraycKCharSmallDict (smallDictt *self, char key, char **array);
-#define setNFreeSmallBoolKCharO(self, key, value) (self)->f->setNFreeSmallBoolKChar(self, key, value)
-#define setNFreeSmallBoolKCharG setNFreeSmallBoolKCharO
+smallJsont* getNDupSmallJsonKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallStringKCharO(self, key) (self)->f->getNDupSmallStringKChar(self, key)
+#define getNDupSmallStringKCharG getNDupSmallStringKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeSmallBoolKCharSmallDict (smallDictt *self, char key, smallBoolt *value);
-#define setNFreeSmallBytesKCharO(self, key, value) (self)->f->setNFreeSmallBytesKChar(self, key, value)
-#define setNFreeSmallBytesKCharG setNFreeSmallBytesKCharO
+smallStringt* getNDupSmallStringKCharSmallDict (smallDictt *self, char key);
+#define getNDupVoidKCharO(self, key) (self)->f->getNDupVoidKChar(self, key)
+#define getNDupVoidKCharG getNDupVoidKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeSmallBytesKCharSmallDict (smallDictt *self, char key, smallBytest *value);
-#define setNFreeSmallDoubleKCharO(self, key, value) (self)->f->setNFreeSmallDoubleKChar(self, key, value)
-#define setNFreeSmallDoubleKCharG setNFreeSmallDoubleKCharO
+void* getNDupVoidKCharSmallDict (smallDictt *self, char key);
+#define getNDupSmallContainerKCharO(self, key) (self)->f->getNDupSmallContainerKChar(self, key)
+#define getNDupSmallContainerKCharG getNDupSmallContainerKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * get element and duplicate object
*
* \param
* key smallDictionary key
- * \param
- * value an object
+ * \return
+ * duplicated object or NULL
*/
-smallDictt* setNFreeSmallDoubleKCharSmallDict (smallDictt *self, char key, smallDoublet *value);
-#define setNFreeSmallIntKCharO(self, key, value) (self)->f->setNFreeSmallIntKChar(self, key, value)
-#define setNFreeSmallIntKCharG setNFreeSmallIntKCharO
+smallContainert* getNDupSmallContainerKCharSmallDict(smallDictt *self, char key);
+#define delKCharO(self, key) (self)->f->delKChar(self, key)
+#define delKCharG delKCharO
/*
- * set element and free
+ * delete element
*
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * free element sObject for given key
+ * this function is to be used before dispose to free some elements
+ * For example:
+ * createSmallDict(d);
+ * smallStringt *s = allocG("the element to keep");
+ * setG(d,"0", "The element to free");
+ * setG(d,"1", s);
+ *
+ * The dictionary a is: {"0":"The element to free", "1":"the element to keep"}
+ *
+ * To dispose d and be able to free all objects, the element for key "0" must be freed with delElem
+ * The sObject for key "1" and the one in s are identical, so the element 1 is freed when s is freed
*
* \param
* key smallDictionary key
- * \param
- * value an object
*/
-smallDictt* setNFreeSmallIntKCharSmallDict (smallDictt *self, char key, smallIntt *value);
-#define setNFreeSmallJsonKCharO(self, key, value) (self)->f->setNFreeSmallJsonKChar(self, key, value)
-#define setNFreeSmallJsonKCharG setNFreeSmallJsonKCharO
+smallDictt* delKCharSmallDict (smallDictt *self, char key);
+#define hasKCharO(self, key) (self)->f->hasKChar(self, key)
+#define hasKCharG hasKCharO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * check if self has 'key'
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * key to find
+ * \return
+ * true when the key is found
*/
-smallDictt* setNFreeSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *value);
-#define setNFreeSmallStringKCharO(self, key, string) (self)->f->setNFreeSmallStringKChar(self, key, string)
-#define setNFreeSmallStringKCharG setNFreeSmallStringKCharO
+bool hasKCharSmallDict (smallDictt *self, char key);
+#define keyByUndefinedO(self, undefined) (self)->f->keyByUndefined(self, undefined)
+#define keyByUndefinedG keyByUndefinedO
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreeSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
-#define setNFreeSmallContainerKCharO(self, key, container) (self)->f->setNFreeSmallContainerKChar(self, key, container)
-#define setNFreeSmallContainerKCharG setNFreeSmallContainerKCharO
+char* keyByUndefinedSmallDict(smallDictt *self, undefinedt *undefined);
/*
- * set element and free
- *
- * value container is freed at the end of the function
- * Example: when setting a smallString, it is copied to an sStringt and then the object is freed
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreeSmallContainerKCharSmallDict(smallDictt *self, char key, smallContainert *container);
-#define setPSmallJsonO(self, key, json) (self)->f->setPSmallJson(self, key, json)
-#define setPSmallJsonG setPSmallJsonO
+char* keyByUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setPSmallJsonSmallDict (smallDictt *self, const char *key, smallJsont *json);
+char* keyByUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+#define keyByBoolO(self, value) (self)->f->keyByBool(self, value)
+#define keyByBoolG keyByBoolO
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* setPSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
+char* keyByBoolSmallDict (smallDictt *self, bool value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* setPSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
-#define setNFreePSmallJsonO(self, key, json) (self)->f->setNFreePSmallJson(self, key, json)
-#define setNFreePSmallJsonG setNFreePSmallJsonO
+char* keyByBoolSmallJson (smallJsont *self, bool value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreePSmallJsonSmallDict (smallDictt *self, const char *key, smallJsont *json);
+char* keyByBoolSmallJson (smallJsont *self, bool value);
+#define keyByDoubleO(self, value) (self)->f->keyByDouble(self, value)
+#define keyByDoubleG keyByDoubleO
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* setNFreePSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
+char* keyByDoubleSmallDict (smallDictt *self, double value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* setNFreePSmallJsonSmallJson (smallJsont *self, const char *key, smallJsont *value);
-#define setPArrayKCharO(self, key, array) (self)->f->setPArrayKChar(self, key, array)
-#define setPArrayKCharG setPArrayKCharO
+char* keyByDoubleSmallJson (smallJsont *self, double value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setPArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
-#define setPDictKCharO(self, key, dict) (self)->f->setPDictKChar(self, key, dict)
-#define setPDictKCharG setPDictKCharO
+char* keyByDoubleSmallJson (smallJsont *self, double value);
+#define keyByIntO(self, value) (self)->f->keyByInt(self, value)
+#define keyByIntG keyByIntO
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setPDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
-#define setPSmallJsonKCharO(self, key, json) (self)->f->setPSmallJsonKChar(self, key, json)
-#define setPSmallJsonKCharG setPSmallJsonKCharO
+char* keyByIntSmallDict (smallDictt *self, int64_t value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setPSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *json);
-#define setPSmallStringKCharO(self, key, string) (self)->f->setPSmallStringKChar(self, key, string)
-#define setPSmallStringKCharG setPSmallStringKCharO
+char* keyByIntSmallJson (smallJsont *self, int64_t value);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setPSmallStringKCharSmallDict (smallDictt *self, char key, smallStringt *string);
-#define setNFreePArrayKCharO(self, key, array) (self)->f->setNFreePArrayKChar(self, key, array)
-#define setNFreePArrayKCharG setNFreePArrayKCharO
+char* keyByIntSmallJson (smallJsont *self, int64_t value);
+#define keyBySO(self, string) (self)->f->keyByS(self, string)
+#define keyBySG keyBySO
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreePArrayKCharSmallDict (smallDictt *self, char key, smallArrayt *array);
-#define setNFreePDictKCharO(self, key, dict) (self)->f->setNFreePDictKChar(self, key, dict)
-#define setNFreePDictKCharG setNFreePDictKCharO
+char* keyBySSmallDict (smallDictt *self, const char *string);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreePDictKCharSmallDict (smallDictt *self, char key, smallDictt *dict);
-#define setNFreePSmallJsonKCharO(self, key, json) (self)->f->setNFreePSmallJsonKChar(self, key, json)
-#define setNFreePSmallJsonKCharG setNFreePSmallJsonKCharO
+char* keyBySSmallJson (smallJsont *self, const char *string);
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreePSmallJsonKCharSmallDict (smallDictt *self, char key, smallJsont *json);
-#define setNFreePSmallStringKCharO(self, key, string) (self)->f->setNFreePSmallStringKChar(self, key, string)
-#define setNFreePSmallStringKCharG setNFreePSmallStringKCharO
+char* keyBySSmallJson (smallJsont *self, const char *string);
+#define keyByCharO(self, c) (self)->f->keyByChar(self, c)
+#define keyByCharG keyByCharO
/*
- * set pointer in element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
- * \param
- * value an object
+ * value
+ * \return
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* setNFreePSmallStringKCharSmallDict(smallDictt *self, char key, smallStringt *string);
-#define getSmallBytesO(self, key) (self)->f->getSmallBytes(self, key)
-#define getSmallBytesG getSmallBytesO
+char* keyByCharSmallDict (smallDictt *self, char c);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getSmallBytesSmallDict (smallDictt *self, const char *key);
+char* keyByCharSmallJson (smallJsont *self, char c);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key dictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getSmallBytesSmallJson (smallJsont *self, const char *key);
+char* keyByCharSmallJson (smallJsont *self, char c);
+#define keyByDictO(self, dict) (self)->f->keyByDict(self, dict)
+#define keyByDictG keyByDictO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key dictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getSmallBytesSmallJson (smallJsont *self, const char *key);
-#define getKCharO(self, key) (self)->f->getKChar(self, key)
-#define getKCharG getKCharO
+char* keyByDictSmallDict (smallDictt *self, smallDictt *dict);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-baset* getKCharSmallDict (smallDictt *self, char key);
-#define getUndefinedKCharO(self, key) (self)->f->getUndefinedKChar(self, key)
-#define getUndefinedKCharG getUndefinedKCharO
+char* keyByDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-undefinedt* getUndefinedKCharSmallDict (smallDictt *self, char key);
-#define getBoolKCharO(self, key) (self)->f->getBoolKChar(self, key)
-#define getBoolKCharG getBoolKCharO
+char* keyByDictSmallJson (smallJsont *self, smallDictt *dict);
+#define keyByArrayO(self, array) (self)->f->keyByArray(self, array)
+#define keyByArrayG keyByArrayO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-bool getBoolKCharSmallDict (smallDictt *self, char key);
-#define getBoolPKCharO(self, key) (self)->f->getBoolPKChar(self, key)
-#define getBoolPKCharG getBoolPKCharO
+char* keyByArraySmallDict (smallDictt *self, smallArrayt *array);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-bool* getBoolPKCharSmallDict (smallDictt *self, char key);
-#define getDoubleKCharO(self, key) (self)->f->getDoubleKChar(self, key)
-#define getDoubleKCharG getDoubleKCharO
+char* keyByArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-double getDoubleKCharSmallDict (smallDictt *self, char key);
-#define getDoublePKCharO(self, key) (self)->f->getDoublePKChar(self, key)
-#define getDoublePKCharG getDoublePKCharO
+char* keyByArraySmallJson (smallJsont *self, smallArrayt *array);
+#define keyByArraycO(self, array) (self)->f->keyByArrayc(self, array)
+#define keyByArraycG keyByArraycO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-double* getDoublePKCharSmallDict (smallDictt *self, char key);
-#define getIntKCharO(self, key) (self)->f->getIntKChar(self, key)
-#define getIntKCharG getIntKCharO
+char* keyByArraycSmallDict (smallDictt *self, char **array);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int64_t getIntKCharSmallDict (smallDictt *self, char key);
-#define getIntPKCharO(self, key) (self)->f->getIntPKChar(self, key)
-#define getIntPKCharG getIntPKCharO
+char* keyByArraycSmallJson (smallJsont *self, char **array);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int64_t* getIntPKCharSmallDict (smallDictt *self, char key);
-#define getInt32KCharO(self, key) (self)->f->getInt32KChar(self, key)
-#define getInt32KCharG getInt32KCharO
+char* keyByArraycSmallJson (smallJsont *self, char **array);
+#define keyBySmallBoolO(self, value) (self)->f->keyBySmallBool(self, value)
+#define keyBySmallBoolG keyBySmallBoolO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int32_t getInt32KCharSmallDict (smallDictt *self, char key);
-#define getInt32PKCharO(self, key) (self)->f->getInt32PKChar(self, key)
-#define getInt32PKCharG getInt32PKCharO
+char* keyBySmallBoolSmallDict (smallDictt *self, smallBoolt *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int32_t* getInt32PKCharSmallDict (smallDictt *self, char key);
-#define getUintKCharO(self, key) (self)->f->getUintKChar(self, key)
-#define getUintKCharG getUintKCharO
+char* keyBySmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-uint64_t getUintKCharSmallDict (smallDictt *self, char key);
-#define getUintPKCharO(self, key) (self)->f->getUintPKChar(self, key)
-#define getUintPKCharG getUintPKCharO
+char* keyBySmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define keyBySmallBytesO(self, value) (self)->f->keyBySmallBytes(self, value)
+#define keyBySmallBytesG keyBySmallBytesO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-uint64_t* getUintPKCharSmallDict (smallDictt *self, char key);
-#define getUint32KCharO(self, key) (self)->f->getUint32KChar(self, key)
-#define getUint32KCharG getUint32KCharO
+char* keyBySmallBytesSmallDict (smallDictt *self, smallBytest *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
- */
-uint32_t getUint32KCharSmallDict (smallDictt *self, char key);
-#define getUint32PKCharO(self, key) (self)->f->getUint32PKChar(self, key)
-#define getUint32PKCharG getUint32PKCharO
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
+ */
+char* keyBySmallBytesSmallJson (smallJsont *self, smallBytest *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-uint32_t* getUint32PKCharSmallDict (smallDictt *self, char key);
-#define getSKCharO(self, key) (self)->f->getSKChar(self, key)
-#define getSKCharG getSKCharO
+char* keyBySmallBytesSmallJson (smallJsont *self, smallBytest *value);
+#define keyBySmallDoubleO(self, value) (self)->f->keyBySmallDouble(self, value)
+#define keyBySmallDoubleG keyBySmallDoubleO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-char* getSKCharSmallDict (smallDictt *self, char key);
-#define getDictKCharO(self, key) (self)->f->getDictKChar(self, key)
-#define getDictKCharG getDictKCharO
+char* keyBySmallDoubleSmallDict (smallDictt *self, smallDoublet *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* getDictKCharSmallDict (smallDictt *self, char key);
-#define getArrayKCharO(self, key) (self)->f->getArrayKChar(self, key)
-#define getArrayKCharG getArrayKCharO
+char* keyBySmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallArrayt* getArrayKCharSmallDict (smallDictt *self, char key);
-#define getSmallBoolKCharO(self, key) (self)->f->getSmallBoolKChar(self, key)
-#define getSmallBoolKCharG getSmallBoolKCharO
+char* keyBySmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+#define keyBySmallIntO(self, value) (self)->f->keyBySmallInt(self, value)
+#define keyBySmallIntG keyBySmallIntO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBoolt* getSmallBoolKCharSmallDict (smallDictt *self, char key);
-#define getSmallBytesKCharO(self, key) (self)->f->getSmallBytesKChar(self, key)
-#define getSmallBytesKCharG getSmallBytesKCharO
+char* keyBySmallIntSmallDict (smallDictt *self, smallIntt *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getSmallBytesKCharSmallDict (smallDictt *self, char key);
-#define getSmallDoubleKCharO(self, key) (self)->f->getSmallDoubleKChar(self, key)
-#define getSmallDoubleKCharG getSmallDoubleKCharO
+char* keyBySmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDoublet* getSmallDoubleKCharSmallDict (smallDictt *self, char key);
-#define getSmallIntKCharO(self, key) (self)->f->getSmallIntKChar(self, key)
-#define getSmallIntKCharG getSmallIntKCharO
+char* keyBySmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define keyBySmallStringO(self, string) (self)->f->keyBySmallString(self, string)
+#define keyBySmallStringG keyBySmallStringO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallIntt* getSmallIntKCharSmallDict (smallDictt *self, char key);
-#define getSmallJsonKCharO(self, key) (self)->f->getSmallJsonKChar(self, key)
-#define getSmallJsonKCharG getSmallJsonKCharO
+char* keyBySmallStringSmallDict (smallDictt *self, smallStringt *string);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* getSmallJsonKCharSmallDict (smallDictt *self, char key);
-#define getSmallStringKCharO(self, key) (self)->f->getSmallStringKChar(self, key)
-#define getSmallStringKCharG getSmallStringKCharO
+char* keyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallStringt* getSmallStringKCharSmallDict (smallDictt *self, char key);
-#define getVoidKCharO(self, key) (self)->f->getVoidKChar(self, key)
-#define getVoidKCharG getVoidKCharO
+char* keyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
+#define keyBySmallContainerO(self, container) (self)->f->keyBySmallContainer(self, container)
+#define keyBySmallContainerG keyBySmallContainerO
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-void* getVoidKCharSmallDict (smallDictt *self, char key);
-#define getSmallContainerKCharO(self, key) (self)->f->getSmallContainerKChar(self, key)
-#define getSmallContainerKCharG getSmallContainerKCharO
+char* keyBySmallContainerSmallDict(smallDictt *self, smallContainert *container);
/*
- * get element
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallContainert* getSmallContainerKCharSmallDict(smallDictt *self, char key);
-#define getNDupSmallBytesO(self, key) (self)->f->getNDupSmallBytes(self, key)
-#define getNDupSmallBytesG getNDupSmallBytesO
+char* keyBySmallContainerSmallJson(smallJsont *self, smallContainert *container);
/*
- * get element and duplicate object
+ * return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getNDupSmallBytesSmallDict (smallDictt *self, const char *key);
+char* keyBySmallContainerSmallJson(smallJsont *self, smallContainert *container);
+#define icKeyBySO(self, string) (self)->f->icKeyByS(self, string)
+#define icKeyBySG icKeyBySO
/*
- * get duplicated object
+ * ignore case and return key for object in dictionary
*
* \param
- * key dictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getNDupSmallBytesSmallJson (smallJsont *self, const char *key);
+char* icKeyBySSmallDict (smallDictt *self, const char *string);
/*
- * get duplicated object
+ * ignore case and return key for object in dictionary
*
* \param
- * key dictionary key
+ * value
* \return
- * object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getNDupSmallBytesSmallJson (smallJsont *self, const char *key);
-#define getNDupKCharO(self, key) (self)->f->getNDupKChar(self, key)
-#define getNDupKCharG getNDupKCharO
+char* icKeyBySSmallJson (smallJsont *self, const char *string);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-baset* getNDupKCharSmallDict (smallDictt *self, char key);
-#define getNDupUndefinedKCharO(self, key) (self)->f->getNDupUndefinedKChar(self, key)
-#define getNDupUndefinedKCharG getNDupUndefinedKCharO
+char* icKeyBySSmallJson (smallJsont *self, const char *string);
+#define icKeyByCharO(self, c) (self)->f->icKeyByChar(self, c)
+#define icKeyByCharG icKeyByCharO
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-undefinedt* getNDupUndefinedKCharSmallDict (smallDictt *self, char key);
-#define getNDupBoolKCharO(self, key) (self)->f->getNDupBoolKChar(self, key)
-#define getNDupBoolKCharG getNDupBoolKCharO
+char* icKeyByCharSmallDict (smallDictt *self, char c);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-bool getNDupBoolKCharSmallDict (smallDictt *self, char key);
-#define getNDupDoubleKCharO(self, key) (self)->f->getNDupDoubleKChar(self, key)
-#define getNDupDoubleKCharG getNDupDoubleKCharO
+char* icKeyByCharSmallJson (smallJsont *self, char c);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-double getNDupDoubleKCharSmallDict (smallDictt *self, char key);
-#define getNDupIntKCharO(self, key) (self)->f->getNDupIntKChar(self, key)
-#define getNDupIntKCharG getNDupIntKCharO
+char* icKeyByCharSmallJson (smallJsont *self, char c);
+#define icKeyByDictO(self, dict) (self)->f->icKeyByDict(self, dict)
+#define icKeyByDictG icKeyByDictO
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int64_t getNDupIntKCharSmallDict (smallDictt *self, char key);
-#define getNDupInt32KCharO(self, key) (self)->f->getNDupInt32KChar(self, key)
-#define getNDupInt32KCharG getNDupInt32KCharO
+char* icKeyByDictSmallDict (smallDictt *self, smallDictt *dict);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-int32_t getNDupInt32KCharSmallDict (smallDictt *self, char key);
-#define getNDupUintKCharO(self, key) (self)->f->getNDupUintKChar(self, key)
-#define getNDupUintKCharG getNDupUintKCharO
+char* icKeyByDictSmallJson (smallJsont *self, smallDictt *dict);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-uint64_t getNDupUintKCharSmallDict (smallDictt *self, char key);
-#define getNDupUint32KCharO(self, key) (self)->f->getNDupUint32KChar(self, key)
-#define getNDupUint32KCharG getNDupUint32KCharO
+char* icKeyByDictSmallJson (smallJsont *self, smallDictt *dict);
+#define icKeyByArrayO(self, array) (self)->f->icKeyByArray(self, array)
+#define icKeyByArrayG icKeyByArrayO
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-uint32_t getNDupUint32KCharSmallDict (smallDictt *self, char key);
-#define getNDupSKCharO(self, key) (self)->f->getNDupSKChar(self, key)
-#define getNDupSKCharG getNDupSKCharO
+char* icKeyByArraySmallDict (smallDictt *self, smallArrayt *array);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-char* getNDupSKCharSmallDict (smallDictt *self, char key);
-#define getNDupDictKCharO(self, key) (self)->f->getNDupDictKChar(self, key)
-#define getNDupDictKCharG getNDupDictKCharO
+char* icKeyByArraySmallJson (smallJsont *self, smallArrayt *array);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDictt* getNDupDictKCharSmallDict (smallDictt *self, char key);
-#define getNDupArrayKCharO(self, key) (self)->f->getNDupArrayKChar(self, key)
-#define getNDupArrayKCharG getNDupArrayKCharO
+char* icKeyByArraySmallJson (smallJsont *self, smallArrayt *array);
+#define icKeyByArraycO(self, array) (self)->f->icKeyByArrayc(self, array)
+#define icKeyByArraycG icKeyByArraycO
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallArrayt* getNDupArrayKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallBoolKCharO(self, key) (self)->f->getNDupSmallBoolKChar(self, key)
-#define getNDupSmallBoolKCharG getNDupSmallBoolKCharO
+char* icKeyByArraycSmallDict (smallDictt *self, char **array);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBoolt* getNDupSmallBoolKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallBytesKCharO(self, key) (self)->f->getNDupSmallBytesKChar(self, key)
-#define getNDupSmallBytesKCharG getNDupSmallBytesKCharO
+char* icKeyByArraycSmallJson (smallJsont *self, char **array);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallBytest* getNDupSmallBytesKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallDoubleKCharO(self, key) (self)->f->getNDupSmallDoubleKChar(self, key)
-#define getNDupSmallDoubleKCharG getNDupSmallDoubleKCharO
+char* icKeyByArraycSmallJson (smallJsont *self, char **array);
+#define icKeyBySmallStringO(self, string) (self)->f->icKeyBySmallString(self, string)
+#define icKeyBySmallStringG icKeyBySmallStringO
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallDoublet* getNDupSmallDoubleKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallIntKCharO(self, key) (self)->f->getNDupSmallIntKChar(self, key)
-#define getNDupSmallIntKCharG getNDupSmallIntKCharO
+char* icKeyBySmallStringSmallDict (smallDictt *self, smallStringt *string);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallIntt* getNDupSmallIntKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallJsonKCharO(self, key) (self)->f->getNDupSmallJsonKChar(self, key)
-#define getNDupSmallJsonKCharG getNDupSmallJsonKCharO
+char* icKeyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
/*
- * get element and duplicate object
+ * ignore case and return key for object in dictionary
*
* \param
- * key smallDictionary key
+ * value
* \return
- * duplicated object or NULL
+ * key
+ * NULL when the value is not found
+ * NULL when array or value are NULL
*/
-smallJsont* getNDupSmallJsonKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallStringKCharO(self, key) (self)->f->getNDupSmallStringKChar(self, key)
-#define getNDupSmallStringKCharG getNDupSmallStringKCharO
+char* icKeyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
+#define keysO(self) (self)->f->keys(self)
+#define keysG keysO
/*
- * get element and duplicate object
+ * list keys
+ */
+char** keysSmallDict (smallDictt *self);
+/*
+ * list keys
+ */
+char** keysSmallJson (smallJsont *self);
+/*
+ * list keys
+ */
+char** keysSmallJson (smallJsont *self);
+#define keysSmallStringO(self) (self)->f->keysSmallString(self)
+#define keysSmallStringG keysSmallStringO
+/*
+ * list keys
+ */
+smallArrayt* keysSmallStringSmallDict(smallDictt *self);
+/*
+ * list keys
+ */
+smallArrayt* keysSmallStringSmallJson (smallJsont *self);
+/*
+ * list keys
+ */
+smallArrayt* keysSmallStringSmallJson (smallJsont *self);
+#define valuesO(self) (self)->f->values(self)
+#define valuesG valuesO
+/*
+ * list values
+ */
+smallArrayt* valuesSmallDict (smallDictt *self);
+/*
+ * list values
+ */
+smallArrayt* valuesSmallJson (smallJsont *self);
+/*
+ * list values
+ */
+smallArrayt* valuesSmallJson (smallJsont *self);
+#define icEqualBaseO(self, p2) (self)->f->icEqualBase(self, p2)
+#define icEqualBaseG icEqualBaseO
+#define iterStartKeyO(self) (self)->f->iterStartKey(self)
+#define iterStartKeyG iterStartKeyO
+/*
+ * iterator
*
- * \param
- * key smallDictionary key
- * \return
- * duplicated object or NULL
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
*/
-smallStringt* getNDupSmallStringKCharSmallDict (smallDictt *self, char key);
-#define getNDupVoidKCharO(self, key) (self)->f->getNDupVoidKChar(self, key)
-#define getNDupVoidKCharG getNDupVoidKCharO
+const char* iterStartKeySmallDict (smallDictt *self);
/*
- * get element and duplicate object
+ * iterator
*
- * \param
- * key smallDictionary key
- * \return
- * duplicated object or NULL
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-void* getNDupVoidKCharSmallDict (smallDictt *self, char key);
-#define getNDupSmallContainerKCharO(self, key) (self)->f->getNDupSmallContainerKChar(self, key)
-#define getNDupSmallContainerKCharG getNDupSmallContainerKCharO
+const char* iterStartKeySmallJson (smallJsont *self);
/*
- * get element and duplicate object
+ * iterator
*
- * \param
- * key smallDictionary key
- * \return
- * duplicated object or NULL
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-smallContainert* getNDupSmallContainerKCharSmallDict(smallDictt *self, char key);
-#define delKCharO(self, key) (self)->f->delKChar(self, key)
-#define delKCharG delKCharO
+const char* iterStartKeySmallJson (smallJsont *self);
+#define iterNextKeyO(self) (self)->f->iterNextKey(self)
+#define iterNextKeyG iterNextKeyO
/*
- * delete element
+ * iterator
*
- * free element sObject for given key
- * this function is to be used before dispose to free some elements
- * For example:
- * createSmallDict(d);
- * smallStringt *s = allocG("the element to keep");
- * setG(d,"0", "The element to free");
- * setG(d,"1", s);
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
+ */
+const char* iterNextKeySmallDict (smallDictt *self);
+/*
+ * iterator
*
- * The dictionary a is: {"0":"The element to free", "1":"the element to keep"}
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
*
- * To dispose d and be able to free all objects, the element for key "0" must be freed with delElem
- * The sObject for key "1" and the one in s are identical, so the element 1 is freed when s is freed
+ * index and step can be negative (python index)
*
- * \param
- * key smallDictionary key
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-smallDictt* delKCharSmallDict (smallDictt *self, char key);
-#define hasKCharO(self, key) (self)->f->hasKChar(self, key)
-#define hasKCharG hasKCharO
+const char* iterNextKeySmallJson (smallJsont *self);
/*
- * check if self has 'key'
+ * iterator
*
- * \param
- * key to find
- * \return
- * true when the key is found
- */
-bool hasKCharSmallDict (smallDictt *self, char key);
-#define keyByUndefinedO(self, undefined) (self)->f->keyByUndefined(self, undefined)
-#define keyByUndefinedG keyByUndefinedO
-/*
- * return key for object in dictionary
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-char* keyByUndefinedSmallDict(smallDictt *self, undefinedt *undefined);
+const char* iterNextKeySmallJson (smallJsont *self);
+#define iterKeyO(self) (self)->f->iterKey(self)
+#define iterKeyG iterKeyO
/*
- * return key for object in dictionary
+ * iterator
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * iterStart resets and starts the iteration
+ * use iterKey method to get current key
+ *
+ * Example:
+ * iter(dict, e) {
+ * logVarG(e);
+ * }
*/
-char* keyByUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
+const char* iterKeySmallDict (smallDictt *self);
/*
- * return key for object in dictionary
+ * iterator
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-char* keyByUndefinedSmallJson(smallJsont *self, undefinedt *undefined);
-#define keyByBoolO(self, value) (self)->f->keyByBool(self, value)
-#define keyByBoolG keyByBoolO
+const char* iterKeySmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * iterator
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * iterStart resets and starts the iteration
+ * use iterIndex method to get current index when the json is an array
+ * use iterKey method to get current key when the json is a dictionary
+ *
+ * index and step can be negative (python index)
+ *
+ * Example:
+ * iter(json, e) {
+ * logVarG(e);
+ * }
*/
-char* keyByBoolSmallDict (smallDictt *self, bool value);
+const char* iterKeySmallJson (smallJsont *self);
+#define zipSmallJsonVArrayO(self, keys, values) (self)->f->zipSmallJsonVArray(self, keys, values)
+#define zipSmallJsonVArrayG zipSmallJsonVArrayO
/*
- * return key for object in dictionary
+ * zip arrays and store in dictionary
*
- * \param
- * value
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * 1 all the elements from keys and values are in the dictionary
+ * 0 some elements from keys and values are in the dictionary or keys or values length is 0
+ * -1 keys or values is NULL
*/
-char* keyByBoolSmallJson (smallJsont *self, bool value);
+smallDictt* zipSmallJsonVArraySmallDict (smallDictt *self, smallJsont *keys, char** values);
+#define zipArrayArrayO(self, keys, values) (self)->f->zipArrayArray(self, keys, values)
+#define zipArrayArrayG zipArrayArrayO
/*
- * return key for object in dictionary
+ * zip arrays and store in dictionary
*
- * \param
- * value
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * 1 all the elements from keys and values are in the dictionary
+ * 0 some elements from keys and values are in the dictionary or keys or values length is 0
+ * -1 keys or values is NULL
*/
-char* keyByBoolSmallJson (smallJsont *self, bool value);
-#define keyByDoubleO(self, value) (self)->f->keyByDouble(self, value)
-#define keyByDoubleG keyByDoubleO
+smallDictt* zipArrayArraySmallDict (smallDictt *self, char** keys, char** values);
+#define zipVArrayO(self, keys, values) (self)->f->zipVArray(self, keys, values)
+#define zipVArrayG zipVArrayO
/*
- * return key for object in dictionary
+ * zip arrays and store in dictionary
*
- * \param
- * value
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * 1 all the elements from keys and values are in the dictionary
+ * 0 some elements from keys and values are in the dictionary or keys or values length is 0
+ * -1 keys or values is NULL
*/
-char* keyByDoubleSmallDict (smallDictt *self, double value);
+smallDictt* zipVArraySmallDict (smallDictt *self, smallArrayt *keys, char** values);
+#define toArrayO(self) (self)->f->toArray(self)
+#define toArrayG toArrayO
/*
- * return key for object in dictionary
+ * convert dictionary to array
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * Array format:
+ * [[key, value], ...]
*/
-char* keyByDoubleSmallJson (smallJsont *self, double value);
+smallArrayt* toArraySmallDict (smallDictt *self);
+#define typeStringKCharO(self, key) (self)->f->typeStringKChar(self, key)
+#define typeStringKCharG typeStringKCharO
/*
- * return key for object in dictionary
+ * get object type string for key
*
* \param
- * value
+ * key in dictionary
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyByDoubleSmallJson (smallJsont *self, double value);
-#define keyByIntO(self, value) (self)->f->keyByInt(self, value)
-#define keyByIntG keyByIntO
+const char* typeStringKCharSmallDict (smallDictt *self, char key);
/*
- * return key for object in dictionary
+ * get object type string for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyByIntSmallDict (smallDictt *self, int64_t value);
+const char* typeStringKCharSmallJson (smallJsont *self, char key);
/*
- * return key for object in dictionary
+ * get object type string for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyByIntSmallJson (smallJsont *self, int64_t value);
+const char* typeStringKCharSmallJson (smallJsont *self, char key);
+#define typeSmallStringKCharO(self, key) (self)->f->typeSmallStringKChar(self, key)
+#define typeSmallStringKCharG typeSmallStringKCharO
/*
- * return key for object in dictionary
+ * get object type string for key
*
* \param
- * value
+ * key in dictionary
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyByIntSmallJson (smallJsont *self, int64_t value);
-#define keyBySO(self, string) (self)->f->keyByS(self, string)
-#define keyBySG keyBySO
+smallStringt* typeSmallStringKCharSmallDict (smallDictt *self, char key);
/*
- * return key for object in dictionary
+ * get object type string for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyBySSmallDict (smallDictt *self, const char *string);
+smallStringt* typeSmallStringKCharSmallJson(smallJsont *self, char key);
/*
- * return key for object in dictionary
+ * get object type string for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type string
*/
-char* keyBySSmallJson (smallJsont *self, const char *string);
+smallStringt* typeSmallStringKCharSmallJson(smallJsont *self, char key);
+#define typeKCharO(self, key) (self)->f->typeKChar(self, key)
+#define typeKCharG typeKCharO
/*
- * return key for object in dictionary
+ * get object type for key
*
* \param
- * value
+ * key in dictionary
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type
*/
-char* keyBySSmallJson (smallJsont *self, const char *string);
-#define keyByCharO(self, c) (self)->f->keyByChar(self, c)
-#define keyByCharG keyByCharO
+char typeKCharSmallDict (smallDictt *self, char key);
/*
- * return key for object in dictionary
+ * get object type for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type
*/
-char* keyByCharSmallDict (smallDictt *self, char c);
+char typeKCharSmallJson (smallJsont *self, char key);
/*
- * return key for object in dictionary
+ * get object type for key or index
*
* \param
- * value
+ * key in dictionary or index in array
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * object type
*/
-char* keyByCharSmallJson (smallJsont *self, char c);
+char typeKCharSmallJson (smallJsont *self, char key);
+#define equalChaO(self, p2) (self)->f->equalCha(self, p2)
+#define equalChaG equalChaO
+#define getTopTypeO(self) (self)->f->getTopType(self)
+#define getTopTypeG getTopTypeO
/*
- * return key for object in dictionary
+ * get top object type string
*
- * \param
- * value
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * type string
*/
-char* keyByCharSmallJson (smallJsont *self, char c);
-#define keyByDictO(self, dict) (self)->f->keyByDict(self, dict)
-#define keyByDictG keyByDictO
+const char* getTopTypeSmallJson(smallJsont *self);
/*
- * return key for object in dictionary
+ * get top object type string
*
- * \param
- * value
* \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * type string
*/
-char* keyByDictSmallDict (smallDictt *self, smallDictt *dict);
+const char* getTopTypeSmallJson(smallJsont *self);
+#define setTypeUndefinedO(self) (self)->f->setTypeUndefined(self)
+#define setTypeUndefinedG setTypeUndefinedO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByDictSmallJson (smallJsont *self, smallDictt *dict);
+smallJsont* setTypeUndefinedSmallJson(smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByDictSmallJson (smallJsont *self, smallDictt *dict);
-#define keyByArrayO(self, array) (self)->f->keyByArray(self, array)
-#define keyByArrayG keyByArrayO
+smallJsont* setTypeUndefinedSmallJson(smallJsont *self);
+#define setTypeBoolO(self) (self)->f->setTypeBool(self)
+#define setTypeBoolG setTypeBoolO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraySmallDict (smallDictt *self, smallArrayt *array);
+smallJsont* setTypeBoolSmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraySmallJson (smallJsont *self, smallArrayt *array);
+smallJsont* setTypeBoolSmallJson (smallJsont *self);
+#define setTypeDoubleO(self) (self)->f->setTypeDouble(self)
+#define setTypeDoubleG setTypeDoubleO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraySmallJson (smallJsont *self, smallArrayt *array);
-#define keyByArraycO(self, array) (self)->f->keyByArrayc(self, array)
-#define keyByArraycG keyByArraycO
+smallJsont* setTypeDoubleSmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraycSmallDict (smallDictt *self, char **array);
+smallJsont* setTypeDoubleSmallJson (smallJsont *self);
+#define setTypeIntO(self) (self)->f->setTypeInt(self)
+#define setTypeIntG setTypeIntO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraycSmallJson (smallJsont *self, char **array);
+smallJsont* setTypeIntSmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyByArraycSmallJson (smallJsont *self, char **array);
-#define keyBySmallBoolO(self, value) (self)->f->keyBySmallBool(self, value)
-#define keyBySmallBoolG keyBySmallBoolO
+smallJsont* setTypeIntSmallJson (smallJsont *self);
+#define setTypeStringO(self) (self)->f->setTypeString(self)
+#define setTypeStringG setTypeStringO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBoolSmallDict (smallDictt *self, smallBoolt *value);
+smallJsont* setTypeStringSmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+smallJsont* setTypeStringSmallJson (smallJsont *self);
+#define setTypeDictO(self) (self)->f->setTypeDict(self)
+#define setTypeDictG setTypeDictO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define keyBySmallBytesO(self, value) (self)->f->keyBySmallBytes(self, value)
-#define keyBySmallBytesG keyBySmallBytesO
+smallJsont* setTypeDictSmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBytesSmallDict (smallDictt *self, smallBytest *value);
+smallJsont* setTypeDictSmallJson (smallJsont *self);
+#define setTypeArrayO(self) (self)->f->setTypeArray(self)
+#define setTypeArrayG setTypeArrayO
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBytesSmallJson (smallJsont *self, smallBytest *value);
+smallJsont* setTypeArraySmallJson (smallJsont *self);
/*
- * return key for object in dictionary
+ * set top object type
*
- * \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * after smallJsont is initialized, it is empty and there is no top object,
+ * this function allocates the top object in self with default values
*/
-char* keyBySmallBytesSmallJson (smallJsont *self, smallBytest *value);
-#define keyBySmallDoubleO(self, value) (self)->f->keyBySmallDouble(self, value)
-#define keyBySmallDoubleG keyBySmallDoubleO
+smallJsont* setTypeArraySmallJson (smallJsont *self);
+#define setTopBoolO(self, value) (self)->f->setTopBool(self, value)
+#define setTopBoolG setTopBoolO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallDoubleSmallDict (smallDictt *self, smallDoublet *value);
+smallJsont* setTopBoolSmallJson (smallJsont *self, bool value);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
+smallJsont* setTopBoolSmallJson (smallJsont *self, bool value);
+#define setTopDoubleO(self, value) (self)->f->setTopDouble(self, value)
+#define setTopDoubleG setTopDoubleO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallDoubleSmallJson (smallJsont *self, smallDoublet *value);
-#define keyBySmallIntO(self, value) (self)->f->keyBySmallInt(self, value)
-#define keyBySmallIntG keyBySmallIntO
+smallJsont* setTopDoubleSmallJson (smallJsont *self, double value);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallIntSmallDict (smallDictt *self, smallIntt *value);
+smallJsont* setTopDoubleSmallJson (smallJsont *self, double value);
+#define setTopIntO(self, value) (self)->f->setTopInt(self, value)
+#define setTopIntG setTopIntO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallIntSmallJson (smallJsont *self, smallIntt *value);
+smallJsont* setTopIntSmallJson (smallJsont *self, int64_t value);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define keyBySmallStringO(self, string) (self)->f->keyBySmallString(self, string)
-#define keyBySmallStringG keyBySmallStringO
+smallJsont* setTopIntSmallJson (smallJsont *self, int64_t value);
+#define setTopStringO(self, value) (self)->f->setTopString(self, value)
+#define setTopStringG setTopStringO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallStringSmallDict (smallDictt *self, smallStringt *string);
+smallJsont* setTopStringSmallJson (smallJsont *self, const char *value);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
+smallJsont* setTopStringSmallJson (smallJsont *self, const char *value);
+#define setTopCharO(self, c) (self)->f->setTopChar(self, c)
+#define setTopCharG setTopCharO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
-#define keyBySmallContainerO(self, container) (self)->f->keyBySmallContainer(self, container)
-#define keyBySmallContainerG keyBySmallContainerO
+smallJsont* setTopCharSmallJson (smallJsont *self, char c);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallContainerSmallDict(smallDictt *self, smallContainert *container);
+smallJsont* setTopCharSmallJson (smallJsont *self, char c);
+#define setTopDictO(self, value) (self)->f->setTopDict(self, value)
+#define setTopDictG setTopDictO
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallContainerSmallJson(smallJsont *self, smallContainert *container);
+smallJsont* setTopDictSmallJson (smallJsont *self, smallDictt *value);
/*
- * return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* keyBySmallContainerSmallJson(smallJsont *self, smallContainert *container);
-#define icKeyBySO(self, string) (self)->f->icKeyByS(self, string)
-#define icKeyBySG icKeyBySO
+smallJsont* setTopDictSmallJson (smallJsont *self, smallDictt *value);
+#define setTopArrayO(self, value) (self)->f->setTopArray(self, value)
+#define setTopArrayG setTopArrayO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySSmallDict (smallDictt *self, const char *string);
+smallJsont* setTopArraySmallJson (smallJsont *self, smallArrayt *value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySSmallJson (smallJsont *self, const char *string);
+smallJsont* setTopArraySmallJson (smallJsont *self, smallArrayt *value);
+#define setTopArraycO(self, value) (self)->f->setTopArrayc(self, value)
+#define setTopArraycG setTopArraycO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySSmallJson (smallJsont *self, const char *string);
-#define icKeyByCharO(self, c) (self)->f->icKeyByChar(self, c)
-#define icKeyByCharG icKeyByCharO
+smallJsont* setTopArraycSmallJson (smallJsont *self, char **value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByCharSmallDict (smallDictt *self, char c);
+smallJsont* setTopArraycSmallJson (smallJsont *self, char **value);
+#define setTopSmallBoolO(self, value) (self)->f->setTopSmallBool(self, value)
+#define setTopSmallBoolG setTopSmallBoolO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByCharSmallJson (smallJsont *self, char c);
+smallJsont* setTopSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByCharSmallJson (smallJsont *self, char c);
-#define icKeyByDictO(self, dict) (self)->f->icKeyByDict(self, dict)
-#define icKeyByDictG icKeyByDictO
+smallJsont* setTopSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define setTopSmallDoubleO(self, value) (self)->f->setTopSmallDouble(self, value)
+#define setTopSmallDoubleG setTopSmallDoubleO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByDictSmallDict (smallDictt *self, smallDictt *dict);
+smallJsont* setTopSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByDictSmallJson (smallJsont *self, smallDictt *dict);
+smallJsont* setTopSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
+#define setTopSmallIntO(self, value) (self)->f->setTopSmallInt(self, value)
+#define setTopSmallIntG setTopSmallIntO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByDictSmallJson (smallJsont *self, smallDictt *dict);
-#define icKeyByArrayO(self, array) (self)->f->icKeyByArray(self, array)
-#define icKeyByArrayG icKeyByArrayO
+smallJsont* setTopSmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraySmallDict (smallDictt *self, smallArrayt *array);
+smallJsont* setTopSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define setTopSmallStringO(self, value) (self)->f->setTopSmallString(self, value)
+#define setTopSmallStringG setTopSmallStringO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraySmallJson (smallJsont *self, smallArrayt *array);
+smallJsont* setTopSmallStringSmallJson(smallJsont *self, smallStringt *value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraySmallJson (smallJsont *self, smallArrayt *array);
-#define icKeyByArraycO(self, array) (self)->f->icKeyByArrayc(self, array)
-#define icKeyByArraycG icKeyByArraycO
+smallJsont* setTopSmallStringSmallJson(smallJsont *self, smallStringt *value);
+#define setTopNFreeBoolO(self, value) (self)->f->setTopNFreeBool(self, value)
+#define setTopNFreeBoolG setTopNFreeBoolO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraycSmallDict (smallDictt *self, char **array);
+smallJsont* setTopNFreeBoolSmallJson (smallJsont *self, bool value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraycSmallJson (smallJsont *self, char **array);
+smallJsont* setTopNFreeBoolSmallJson (smallJsont *self, bool value);
+#define setTopNFreeDoubleO(self, value) (self)->f->setTopNFreeDouble(self, value)
+#define setTopNFreeDoubleG setTopNFreeDoubleO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyByArraycSmallJson (smallJsont *self, char **array);
-#define icKeyBySmallStringO(self, string) (self)->f->icKeyBySmallString(self, string)
-#define icKeyBySmallStringG icKeyBySmallStringO
+smallJsont* setTopNFreeDoubleSmallJson (smallJsont *self, double value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySmallStringSmallDict (smallDictt *self, smallStringt *string);
+smallJsont* setTopNFreeDoubleSmallJson (smallJsont *self, double value);
+#define setTopNFreeIntO(self, value) (self)->f->setTopNFreeInt(self, value)
+#define setTopNFreeIntG setTopNFreeIntO
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
+smallJsont* setTopNFreeIntSmallJson (smallJsont *self, int64_t value);
/*
- * ignore case and return key for object in dictionary
+ * set top object in self and free value container
*
* \param
- * value
- * \return
- * key
- * NULL when the value is not found
- * NULL when array or value are NULL
+ * value object to set in self
*/
-char* icKeyBySmallStringSmallJson (smallJsont *self, smallStringt *string);
-#define keysO(self) (self)->f->keys(self)
-#define keysG keysO
+smallJsont* setTopNFreeIntSmallJson (smallJsont *self, int64_t value);
+#define setTopNFreeStringO(self, value) (self)->f->setTopNFreeString(self, value)
+#define setTopNFreeStringG setTopNFreeStringO
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-char** keysSmallDict (smallDictt *self);
+smallJsont* setTopNFreeStringSmallJson (smallJsont *self, char *value);
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-char** keysSmallJson (smallJsont *self);
+smallJsont* setTopNFreeStringSmallJson (smallJsont *self, char *value);
+#define setTopNFreeDictO(self, value) (self)->f->setTopNFreeDict(self, value)
+#define setTopNFreeDictG setTopNFreeDictO
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-char** keysSmallJson (smallJsont *self);
-#define keysSmallStringO(self) (self)->f->keysSmallString(self)
-#define keysSmallStringG keysSmallStringO
+smallJsont* setTopNFreeDictSmallJson (smallJsont *self, smallDictt *value);
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* keysSmallStringSmallDict(smallDictt *self);
+smallJsont* setTopNFreeDictSmallJson (smallJsont *self, smallDictt *value);
+#define setTopNFreeArrayO(self, value) (self)->f->setTopNFreeArray(self, value)
+#define setTopNFreeArrayG setTopNFreeArrayO
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* keysSmallStringSmallJson (smallJsont *self);
+smallJsont* setTopNFreeArraySmallJson (smallJsont *self, smallArrayt *value);
/*
- * list keys
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* keysSmallStringSmallJson (smallJsont *self);
-#define valuesO(self) (self)->f->values(self)
-#define valuesG valuesO
+smallJsont* setTopNFreeArraySmallJson (smallJsont *self, smallArrayt *value);
+#define setTopNFreeArraycO(self, value) (self)->f->setTopNFreeArrayc(self, value)
+#define setTopNFreeArraycG setTopNFreeArraycO
/*
- * list values
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* valuesSmallDict (smallDictt *self);
+smallJsont* setTopNFreeArraycSmallJson (smallJsont *self, char **value);
/*
- * list values
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* valuesSmallJson (smallJsont *self);
+smallJsont* setTopNFreeArraycSmallJson (smallJsont *self, char **value);
+#define setTopNFreeSmallBoolO(self, value) (self)->f->setTopNFreeSmallBool(self, value)
+#define setTopNFreeSmallBoolG setTopNFreeSmallBoolO
/*
- * list values
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
*/
-smallArrayt* valuesSmallJson (smallJsont *self);
-#define icEqualBaseO(self, p2) (self)->f->icEqualBase(self, p2)
-#define icEqualBaseG icEqualBaseO
-#define iterStartKeyO(self) (self)->f->iterStartKey(self)
-#define iterStartKeyG iterStartKeyO
+smallJsont* setTopNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * set top object in self and free value container
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterStartKeySmallDict (smallDictt *self);
+smallJsont* setTopNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+#define setTopNFreeSmallDoubleO(self, value) (self)->f->setTopNFreeSmallDouble(self, value)
+#define setTopNFreeSmallDoubleG setTopNFreeSmallDoubleO
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * set top object in self and free value container
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterStartKeySmallJson (smallJsont *self);
+smallJsont* setTopNFreeSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * set top object in self and free value container
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterStartKeySmallJson (smallJsont *self);
-#define iterNextKeyO(self) (self)->f->iterNextKey(self)
-#define iterNextKeyG iterNextKeyO
+smallJsont* setTopNFreeSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
+#define setTopNFreeSmallIntO(self, value) (self)->f->setTopNFreeSmallInt(self, value)
+#define setTopNFreeSmallIntG setTopNFreeSmallIntO
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * set top object in self and free value container
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterNextKeySmallDict (smallDictt *self);
+smallJsont* setTopNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * set top object in self and free value container
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterNextKeySmallJson (smallJsont *self);
+smallJsont* setTopNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
+#define setTopNFreeSmallStringO(self, value) (self)->f->setTopNFreeSmallString(self, value)
+#define setTopNFreeSmallStringG setTopNFreeSmallStringO
/*
- * iterator
- *
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
- *
- * index and step can be negative (python index)
+ * set top object in self and free value container
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * \param
+ * value object to set in self
*/
-const char* iterNextKeySmallJson (smallJsont *self);
-#define iterKeyO(self) (self)->f->iterKey(self)
-#define iterKeyG iterKeyO
+smallJsont* setTopNFreeSmallStringSmallJson(smallJsont *self, smallStringt *value);
+/*
+ * set top object in self and free value container
+ *
+ * \param
+ * value object to set in self
+ */
+smallJsont* setTopNFreeSmallStringSmallJson(smallJsont *self, smallStringt *value);
+#define fromArrayDictO(self, items) (self)->f->fromArrayDict(self, items)
+#define fromArrayDictG fromArrayDictO
/*
- * iterator
+ * convert array to dictionary
*
- * iterStart resets and starts the iteration
- * use iterKey method to get current key
+ * The array must have the format:
+ * [[key(string), value], ...]
*
- * Example:
- * iter(dict, e) {
- * logVarG(e);
- * }
+ * Elements not in this format are not added to the dictionary
*/
-const char* iterKeySmallDict (smallDictt *self);
+smallJsont* fromArrayDictSmallJson (smallJsont *self, smallArrayt *items);
/*
- * iterator
+ * convert array to dictionary
*
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
+ * The array must have the format:
+ * [[key(string), value], ...]
*
- * index and step can be negative (python index)
+ * Elements not in this format are not added to the dictionary
+ */
+smallJsont* fromArrayDictSmallJson (smallJsont *self, smallArrayt *items);
+#define toArrayDictO(self) (self)->f->toArrayDict(self)
+#define toArrayDictG toArrayDictO
+/*
+ * convert dictionary to array
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * Array format:
+ * [[key, value], ...]
*/
-const char* iterKeySmallJson (smallJsont *self);
+smallArrayt* toArrayDictSmallJson (smallJsont *self);
/*
- * iterator
+ * convert dictionary to array
*
- * iterStart resets and starts the iteration
- * use iterIndex method to get current index when the json is an array
- * use iterKey method to get current key when the json is a dictionary
+ * Array format:
+ * [[key, value], ...]
+ */
+smallArrayt* toArrayDictSmallJson (smallJsont *self);
+#define getTopUndefinedO(self) (self)->f->getTopUndefined(self)
+#define getTopUndefinedG getTopUndefinedO
+/*
+ * get a baset object with the top object from self inside
*
- * index and step can be negative (python index)
+ * when the object is reallocated use setTop function to update the pointer in self
+ */
+undefinedt* getTopUndefinedSmallJson (smallJsont *self);
+/*
+ * get a baset object with the top object from self inside
*
- * Example:
- * iter(json, e) {
- * logVarG(e);
- * }
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* iterKeySmallJson (smallJsont *self);
-#define zipSmallJsonVArrayO(self, keys, values) (self)->f->zipSmallJsonVArray(self, keys, values)
-#define zipSmallJsonVArrayG zipSmallJsonVArrayO
+undefinedt* getTopUndefinedSmallJson (smallJsont *self);
+#define getTopBoolO(self) (self)->f->getTopBool(self)
+#define getTopBoolG getTopBoolO
/*
- * zip arrays and store in dictionary
+ * get a baset object with the top object from self inside
*
- * \return
- * 1 all the elements from keys and values are in the dictionary
- * 0 some elements from keys and values are in the dictionary or keys or values length is 0
- * -1 keys or values is NULL
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallDictt* zipSmallJsonVArraySmallDict (smallDictt *self, smallJsont *keys, char** values);
-#define zipArrayArrayO(self, keys, values) (self)->f->zipArrayArray(self, keys, values)
-#define zipArrayArrayG zipArrayArrayO
+bool getTopBoolSmallJson (smallJsont *self);
/*
- * zip arrays and store in dictionary
+ * get a baset object with the top object from self inside
*
- * \return
- * 1 all the elements from keys and values are in the dictionary
- * 0 some elements from keys and values are in the dictionary or keys or values length is 0
- * -1 keys or values is NULL
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallDictt* zipArrayArraySmallDict (smallDictt *self, char** keys, char** values);
-#define zipVArrayO(self, keys, values) (self)->f->zipVArray(self, keys, values)
-#define zipVArrayG zipVArrayO
+bool getTopBoolSmallJson (smallJsont *self);
+#define getTopBoolPO(self) (self)->f->getTopBoolP(self)
+#define getTopBoolPG getTopBoolPO
/*
- * zip arrays and store in dictionary
+ * get a baset object with the top object from self inside
*
- * \return
- * 1 all the elements from keys and values are in the dictionary
- * 0 some elements from keys and values are in the dictionary or keys or values length is 0
- * -1 keys or values is NULL
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallDictt* zipVArraySmallDict (smallDictt *self, smallArrayt *keys, char** values);
-#define toArrayO(self) (self)->f->toArray(self)
-#define toArrayG toArrayO
+bool* getTopBoolPSmallJson (smallJsont *self);
/*
- * convert dictionary to array
+ * get a baset object with the top object from self inside
*
- * Array format:
- * [[key, value], ...]
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallArrayt* toArraySmallDict (smallDictt *self);
-#define typeStringKCharO(self, key) (self)->f->typeStringKChar(self, key)
-#define typeStringKCharG typeStringKCharO
+bool* getTopBoolPSmallJson (smallJsont *self);
+#define getTopDoubleO(self) (self)->f->getTopDouble(self)
+#define getTopDoubleG getTopDoubleO
/*
- * get object type string for key
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* typeStringKCharSmallDict (smallDictt *self, char key);
+double getTopDoubleSmallJson (smallJsont *self);
/*
- * get object type string for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* typeStringKCharSmallJson (smallJsont *self, char key);
+double getTopDoubleSmallJson (smallJsont *self);
+#define getTopDoublePO(self) (self)->f->getTopDoubleP(self)
+#define getTopDoublePG getTopDoublePO
/*
- * get object type string for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* typeStringKCharSmallJson (smallJsont *self, char key);
-#define typeSmallStringKCharO(self, key) (self)->f->typeSmallStringKChar(self, key)
-#define typeSmallStringKCharG typeSmallStringKCharO
+double* getTopDoublePSmallJson (smallJsont *self);
/*
- * get object type string for key
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallStringt* typeSmallStringKCharSmallDict (smallDictt *self, char key);
+double* getTopDoublePSmallJson (smallJsont *self);
+#define getTopIntO(self) (self)->f->getTopInt(self)
+#define getTopIntG getTopIntO
/*
- * get object type string for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallStringt* typeSmallStringKCharSmallJson(smallJsont *self, char key);
+int64_t getTopIntSmallJson (smallJsont *self);
/*
- * get object type string for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallStringt* typeSmallStringKCharSmallJson(smallJsont *self, char key);
-#define typeKCharO(self, key) (self)->f->typeKChar(self, key)
-#define typeKCharG typeKCharO
+int64_t getTopIntSmallJson (smallJsont *self);
+#define getTopIntPO(self) (self)->f->getTopIntP(self)
+#define getTopIntPG getTopIntPO
/*
- * get object type for key
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary
- * \return
- * object type
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-char typeKCharSmallDict (smallDictt *self, char key);
+int64_t* getTopIntPSmallJson (smallJsont *self);
/*
- * get object type for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-char typeKCharSmallJson (smallJsont *self, char key);
+int64_t* getTopIntPSmallJson (smallJsont *self);
+#define getTopInt32O(self) (self)->f->getTopInt32(self)
+#define getTopInt32G getTopInt32O
/*
- * get object type for key or index
+ * get a baset object with the top object from self inside
*
- * \param
- * key in dictionary or index in array
- * \return
- * object type
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-char typeKCharSmallJson (smallJsont *self, char key);
-#define equalChaO(self, p2) (self)->f->equalCha(self, p2)
-#define equalChaG equalChaO
-#define getTopTypeO(self) (self)->f->getTopType(self)
-#define getTopTypeG getTopTypeO
+int32_t getTopInt32SmallJson (smallJsont *self);
/*
- * get top object type string
+ * get a baset object with the top object from self inside
*
- * \return
- * type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* getTopTypeSmallJson(smallJsont *self);
+int32_t getTopInt32SmallJson (smallJsont *self);
+#define getTopInt32PO(self) (self)->f->getTopInt32P(self)
+#define getTopInt32PG getTopInt32PO
/*
- * get top object type string
+ * get a baset object with the top object from self inside
*
- * \return
- * type string
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-const char* getTopTypeSmallJson(smallJsont *self);
-#define setTypeUndefinedO(self) (self)->f->setTypeUndefined(self)
-#define setTypeUndefinedG setTypeUndefinedO
+int32_t* getTopInt32PSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeUndefinedSmallJson(smallJsont *self);
+int32_t* getTopInt32PSmallJson (smallJsont *self);
+#define getTopUintO(self) (self)->f->getTopUint(self)
+#define getTopUintG getTopUintO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeUndefinedSmallJson(smallJsont *self);
-#define setTypeBoolO(self) (self)->f->setTypeBool(self)
-#define setTypeBoolG setTypeBoolO
+uint64_t getTopUintSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeBoolSmallJson (smallJsont *self);
+uint64_t getTopUintSmallJson (smallJsont *self);
+#define getTopUintPO(self) (self)->f->getTopUintP(self)
+#define getTopUintPG getTopUintPO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeBoolSmallJson (smallJsont *self);
-#define setTypeDoubleO(self) (self)->f->setTypeDouble(self)
-#define setTypeDoubleG setTypeDoubleO
+uint64_t* getTopUintPSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeDoubleSmallJson (smallJsont *self);
+uint64_t* getTopUintPSmallJson (smallJsont *self);
+#define getTopUint32O(self) (self)->f->getTopUint32(self)
+#define getTopUint32G getTopUint32O
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeDoubleSmallJson (smallJsont *self);
-#define setTypeIntO(self) (self)->f->setTypeInt(self)
-#define setTypeIntG setTypeIntO
+uint32_t getTopUint32SmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeIntSmallJson (smallJsont *self);
+uint32_t getTopUint32SmallJson (smallJsont *self);
+#define getTopUint32PO(self) (self)->f->getTopUint32P(self)
+#define getTopUint32PG getTopUint32PO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeIntSmallJson (smallJsont *self);
-#define setTypeStringO(self) (self)->f->setTypeString(self)
-#define setTypeStringG setTypeStringO
+uint32_t* getTopUint32PSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeStringSmallJson (smallJsont *self);
+uint32_t* getTopUint32PSmallJson (smallJsont *self);
+#define getTopSO(self) (self)->f->getTopS(self)
+#define getTopSG getTopSO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeStringSmallJson (smallJsont *self);
-#define setTypeDictO(self) (self)->f->setTypeDict(self)
-#define setTypeDictG setTypeDictO
+char* getTopSSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeDictSmallJson (smallJsont *self);
+char* getTopSSmallJson (smallJsont *self);
+#define getTopDictO(self) (self)->f->getTopDict(self)
+#define getTopDictG getTopDictO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeDictSmallJson (smallJsont *self);
-#define setTypeArrayO(self) (self)->f->setTypeArray(self)
-#define setTypeArrayG setTypeArrayO
+smallDictt* getTopDictSmallJson (smallJsont *self);
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeArraySmallJson (smallJsont *self);
+smallDictt* getTopDictSmallJson (smallJsont *self);
+#define getTopArrayO(self) (self)->f->getTopArray(self)
+#define getTopArrayG getTopArrayO
/*
- * set top object type
+ * get a baset object with the top object from self inside
*
- * after smallJsont is initialized, it is empty and there is no top object,
- * this function allocates the top object in self with default values
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTypeArraySmallJson (smallJsont *self);
-#define setTopBoolO(self, value) (self)->f->setTopBool(self, value)
-#define setTopBoolG setTopBoolO
+smallArrayt* getTopArraySmallJson (smallJsont *self);
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopBoolSmallJson (smallJsont *self, bool value);
+smallArrayt* getTopArraySmallJson (smallJsont *self);
+#define getTopSmallBoolO(self) (self)->f->getTopSmallBool(self)
+#define getTopSmallBoolG getTopSmallBoolO
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopBoolSmallJson (smallJsont *self, bool value);
-#define setTopDoubleO(self, value) (self)->f->setTopDouble(self, value)
-#define setTopDoubleG setTopDoubleO
+smallBoolt* getTopSmallBoolSmallJson (smallJsont *self);
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopDoubleSmallJson (smallJsont *self, double value);
+smallBoolt* getTopSmallBoolSmallJson (smallJsont *self);
+#define getTopSmallDoubleO(self) (self)->f->getTopSmallDouble(self)
+#define getTopSmallDoubleG getTopSmallDoubleO
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopDoubleSmallJson (smallJsont *self, double value);
-#define setTopIntO(self, value) (self)->f->setTopInt(self, value)
-#define setTopIntG setTopIntO
+smallDoublet* getTopSmallDoubleSmallJson(smallJsont *self);
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopIntSmallJson (smallJsont *self, int64_t value);
+smallDoublet* getTopSmallDoubleSmallJson(smallJsont *self);
+#define getTopSmallIntO(self) (self)->f->getTopSmallInt(self)
+#define getTopSmallIntG getTopSmallIntO
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopIntSmallJson (smallJsont *self, int64_t value);
-#define setTopStringO(self, value) (self)->f->setTopString(self, value)
-#define setTopStringG setTopStringO
+smallIntt* getTopSmallIntSmallJson (smallJsont *self);
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopStringSmallJson (smallJsont *self, const char *value);
+smallIntt* getTopSmallIntSmallJson (smallJsont *self);
+#define getTopSmallStringO(self) (self)->f->getTopSmallString(self)
+#define getTopSmallStringG getTopSmallStringO
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopStringSmallJson (smallJsont *self, const char *value);
-#define setTopCharO(self, c) (self)->f->setTopChar(self, c)
-#define setTopCharG setTopCharO
+smallStringt* getTopSmallStringSmallJson(smallJsont *self);
/*
- * set top object in self
+ * get a baset object with the top object from self inside
*
- * \param
- * value object to set in self
+ * when the object is reallocated use setTop function to update the pointer in self
*/
-smallJsont* setTopCharSmallJson (smallJsont *self, char c);
+smallStringt* getTopSmallStringSmallJson(smallJsont *self);
+#define keyIsO(self, key) (self)->f->keyIs(self, key)
+#define keyIsG keyIsO
/*
- * set top object in self
+ * keyIs
+ * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
+ *
+ * use the jsonPathResS[] array to convert the result to string (or use keyIsS to get the result as string directly)
*
* \param
- * value object to set in self
+ * key any key or path in self
+ * \return
+ * key type (enum int)
+ * 0 (KEY_IS_NULL in enum) when key is NULL
*/
-smallJsont* setTopCharSmallJson (smallJsont *self, char c);
-#define setTopDictO(self, value) (self)->f->setTopDict(self, value)
-#define setTopDictG setTopDictO
+jsonPathRest keyIsSmallJson (smallJsont *self, const char *key);
/*
- * set top object in self
+ * keyIs
+ * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
+ *
+ * use the jsonPathResS[] array to convert the result to string (or use keyIsS to get the result as string directly)
*
* \param
- * value object to set in self
+ * key any key or path in self
+ * \return
+ * key type (enum int)
+ * 0 (KEY_IS_NULL in enum) when key is NULL
*/
-smallJsont* setTopDictSmallJson (smallJsont *self, smallDictt *value);
+jsonPathRest keyIsSmallJson (smallJsont *self, const char *key);
+#define keyIsSO(self, key) (self)->f->keyIsS(self, key)
+#define keyIsSG keyIsSO
/*
- * set top object in self
+ * keyIs returning result as string
+ * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
*
* \param
- * value object to set in self
+ * key any key or path in self
+ * \return
+ * key type
+ * NULL when key is NULL
*/
-smallJsont* setTopDictSmallJson (smallJsont *self, smallDictt *value);
-#define setTopArrayO(self, value) (self)->f->setTopArray(self, value)
-#define setTopArrayG setTopArrayO
+const char* keyIsSSmallJson (smallJsont *self, const char *key);
/*
- * set top object in self
+ * keyIs returning result as string
+ * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
*
* \param
- * value object to set in self
+ * key any key or path in self
+ * \return
+ * key type
+ * NULL when key is NULL
*/
-smallJsont* setTopArraySmallJson (smallJsont *self, smallArrayt *value);
+const char* keyIsSSmallJson (smallJsont *self, const char *key);
+#define makeKeyO(self, key) (self)->f->makeKey(self, key)
+#define makeKeyG makeKeyO
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
*
* \param
- * value object to set in self
+ * key key to transform
+ * \return
+ * new dictionary key (you must free this buffer)
+ * NULL when key is NULL
*/
-smallJsont* setTopArraySmallJson (smallJsont *self, smallArrayt *value);
-#define setTopArraycO(self, value) (self)->f->setTopArrayc(self, value)
-#define setTopArraycG setTopArraycO
+char* makeKeySmallJson (smallJsont *self, const char *key);
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
*
* \param
- * value object to set in self
+ * key key to transform
+ * \return
+ * new dictionary key (you must free this buffer)
+ * NULL when key is NULL
*/
-smallJsont* setTopArraycSmallJson (smallJsont *self, char **value);
+char* makeKeySmallJson (smallJsont *self, const char *key);
+#define iMakeKeyO(self, key) (self)->f->iMakeKey(self, key)
+#define iMakeKeyG iMakeKeyO
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
*
* \param
- * value object to set in self
+ * key pointer to key to transform (this parameter is reallocated)
+ * \return
+ * new dictionary key (you must free this buffer)
+ * NULL when key is NULL
*/
-smallJsont* setTopArraycSmallJson (smallJsont *self, char **value);
-#define setTopSmallBoolO(self, value) (self)->f->setTopSmallBool(self, value)
-#define setTopSmallBoolG setTopSmallBoolO
+char* iMakeKeySmallJson (smallJsont *self, char **key);
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
*
* \param
- * value object to set in self
+ * key pointer to key to transform (this parameter is reallocated)
+ * \return
+ * new dictionary key (you must free this buffer)
+ * NULL when key is NULL
*/
-smallJsont* setTopSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+char* iMakeKeySmallJson (smallJsont *self, char **key);
+#define bMakeKeyO(self, dest, key) (self)->f->bMakeKey(self, dest, key)
+#define bMakeKeyG bMakeKeyO
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * the result is stored dest, dest must be big enough (at least makeKeyLen+1)
*
* \param
- * value object to set in self
+ * key key to transform
+ * \param
+ * dest result buffer
+ * \return
+ * dictionary key in dest
+ * NULL when key is NULL
*/
-smallJsont* setTopSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define setTopSmallDoubleO(self, value) (self)->f->setTopSmallDouble(self, value)
-#define setTopSmallDoubleG setTopSmallDoubleO
+char* bMakeKeySmallJson (smallJsont *self, char *dest, const char *key);
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * the result is stored dest, dest must be big enough (at least makeKeyLen+1)
*
* \param
- * value object to set in self
+ * key key to transform
+ * \param
+ * dest result buffer
+ * \return
+ * dictionary key in dest
+ * NULL when key is NULL
*/
-smallJsont* setTopSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
+char* bMakeKeySmallJson (smallJsont *self, char *dest, const char *key);
+#define bLMakeKeyO(self, dest, size, key) (self)->f->bLMakeKey(self, dest, size, key)
+#define bLMakeKeyG bLMakeKeyO
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * the result is stored dest, dest size must be big enough (at least makeKeyLen+1)
*
* \param
- * value object to set in self
+ * key key to transform
+ * \param
+ * dest result buffer
+ * \param
+ * size dest buffer size
+ * \return
+ * dictionary key in dest
+ * NULL when key is NULL
*/
-smallJsont* setTopSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
-#define setTopSmallIntO(self, value) (self)->f->setTopSmallInt(self, value)
-#define setTopSmallIntG setTopSmallIntO
+char* bLMakeKeySmallJson (smallJsont *self, char *dest, size_t size, const char *key);
/*
- * set top object in self
+ * make json key
+ * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * the result is stored dest, dest size must be big enough (at least makeKeyLen+1)
*
* \param
- * value object to set in self
+ * key key to transform
+ * \param
+ * dest result buffer
+ * \param
+ * size dest buffer size
+ * \return
+ * dictionary key in dest
+ * NULL when key is NULL
*/
-smallJsont* setTopSmallIntSmallJson (smallJsont *self, smallIntt *value);
+char* bLMakeKeySmallJson (smallJsont *self, char *dest, size_t size, const char *key);
+#define makeKeyLenO(self, key) (self)->f->makeKeyLen(self, key)
+#define makeKeyLenG makeKeyLenO
/*
- * set top object in self
+ * return key length after running makeKey
*
* \param
- * value object to set in self
+ * key key to transform
+ * \return
+ * dictionary key length
+ * 0 when key is NULL
*/
-smallJsont* setTopSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define setTopSmallStringO(self, value) (self)->f->setTopSmallString(self, value)
-#define setTopSmallStringG setTopSmallStringO
+size_t makeKeyLenSmallJson(smallJsont *self, const char *key);
/*
- * set top object in self
+ * return key length after running makeKey
*
* \param
- * value object to set in self
+ * key key to transform
+ * \return
+ * dictionary key length
+ * 0 when key is NULL
*/
-smallJsont* setTopSmallStringSmallJson(smallJsont *self, smallStringt *value);
+size_t makeKeyLenSmallJson(smallJsont *self, const char *key);
+#define mergeDictO(self, smallDict) (self)->f->mergeDict(self, smallDict)
+#define mergeDictG mergeDictO
/*
- * set top object in self
- *
- * \param
- * value object to set in self
+ * merge override - already existing values are replaced
*/
-smallJsont* setTopSmallStringSmallJson(smallJsont *self, smallStringt *value);
-#define setTopNFreeBoolO(self, value) (self)->f->setTopNFreeBool(self, value)
-#define setTopNFreeBoolG setTopNFreeBoolO
+smallJsont* mergeDictSmallJson (smallJsont *self, smallDictt *smallDict);
/*
- * set top object in self and free value container
- *
- * \param
- * value object to set in self
+ * merge override - already existing values are replaced
*/
-smallJsont* setTopNFreeBoolSmallJson (smallJsont *self, bool value);
+smallJsont* mergeDictSmallJson (smallJsont *self, smallDictt *smallDict);
+#define mergeDictNSmashO(self, smallDict) (self)->f->mergeDictNSmash(self, smallDict)
+#define mergeDictNSmashG mergeDictNSmashO
/*
- * set top object in self and free value container
- *
- * \param
- * value object to set in self
+ * merge override - already existing values are replaced
*/
-smallJsont* setTopNFreeBoolSmallJson (smallJsont *self, bool value);
-#define setTopNFreeDoubleO(self, value) (self)->f->setTopNFreeDouble(self, value)
-#define setTopNFreeDoubleG setTopNFreeDoubleO
+smallJsont* mergeDictNSmashSmallJson (smallJsont *self, smallDictt *smallDict);
/*
- * set top object in self and free value container
- *
- * \param
- * value object to set in self
+ * merge override - already existing values are replaced
*/
-smallJsont* setTopNFreeDoubleSmallJson (smallJsont *self, double value);
+smallJsont* mergeDictNSmashSmallJson (smallJsont *self, smallDictt *smallDict);
+#define addJsonO(self, array) (self)->f->addJson(self, array)
+#define addJsonG addJsonO
/*
- * set top object in self and free value container
+ * add self and list in a new list
*
* \param
- * value object to set in self
+ * list
+ * \return
+ * new list with self and list
+ * empty list when self and list are NULL or empty
*/
-smallJsont* setTopNFreeDoubleSmallJson (smallJsont *self, double value);
-#define setTopNFreeIntO(self, value) (self)->f->setTopNFreeInt(self, value)
-#define setTopNFreeIntG setTopNFreeIntO
+smallJsont* addJsonSmallJson (smallJsont *self, smallJsont *array);
/*
- * set top object in self and free value container
+ * add self and list in a new list
*
* \param
- * value object to set in self
+ * list
+ * \return
+ * new list with self and list
+ * empty list when self and list are NULL or empty
*/
-smallJsont* setTopNFreeIntSmallJson (smallJsont *self, int64_t value);
+smallJsont* addJsonSmallJson (smallJsont *self, smallJsont *array);
+#define cropSO(self, start, end) (self)->f->cropS(self, start, end)
+#define cropSG cropSO
/*
- * set top object in self and free value container
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
*
* \param
- * value object to set in self
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
*/
-smallJsont* setTopNFreeIntSmallJson (smallJsont *self, int64_t value);
-#define setTopNFreeStringO(self, value) (self)->f->setTopNFreeString(self, value)
-#define setTopNFreeStringG setTopNFreeStringO
+char* cropSSmallJson (smallJsont *self, intmax_t start, intmax_t end);
/*
- * set top object in self and free value container
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
*
* \param
- * value object to set in self
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
*/
-smallJsont* setTopNFreeStringSmallJson (smallJsont *self, char *value);
+char* cropSSmallJson (smallJsont *self, intmax_t start, intmax_t end);
/*
- * set top object in self and free value container
+ * Crop characters from start to end
+ * return a new string with characters from start and end
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * start index, must be in the string
+ * \param
+ * end index, must be in the string
+ * \return
+ * new sliced string (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when string is empty
+ * unchanged when string is NULL or when start and end are not set correctly
+ * NULL error
*/
-smallJsont* setTopNFreeStringSmallJson (smallJsont *self, char *value);
-#define setTopNFreeDictO(self, value) (self)->f->setTopNFreeDict(self, value)
-#define setTopNFreeDictG setTopNFreeDictO
+char* cropSSmallString(smallStringt *self, intmax_t start, intmax_t end);
+#define cropElemAtO(self, index) (self)->f->cropElemAt(self, index)
+#define cropElemAtG cropElemAtO
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeDictSmallJson (smallJsont *self, smallDictt *value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeDictSmallJson (smallJsont *self, smallDictt *value);
-#define setTopNFreeArrayO(self, value) (self)->f->setTopNFreeArray(self, value)
-#define setTopNFreeArrayG setTopNFreeArrayO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeArraySmallJson (smallJsont *self, smallArrayt *value);
+baset* cropElemAtSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeArraySmallJson (smallJsont *self, smallArrayt *value);
-#define setTopNFreeArraycO(self, value) (self)->f->setTopNFreeArrayc(self, value)
-#define setTopNFreeArraycG setTopNFreeArraycO
+smallJsont* cropElemAtSmallJsonSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtUndefinedO(self, index) (self)->f->cropElemAtUndefined(self, index)
+#define cropElemAtUndefinedG cropElemAtUndefinedO
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeArraycSmallJson (smallJsont *self, char **value);
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeArraycSmallJson (smallJsont *self, char **value);
-#define setTopNFreeSmallBoolO(self, value) (self)->f->setTopNFreeSmallBool(self, value)
-#define setTopNFreeSmallBoolG setTopNFreeSmallBoolO
+undefinedt* cropElemAtUndefinedSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtBoolO(self, index) (self)->f->cropElemAtBool(self, index)
+#define cropElemAtBoolG cropElemAtBoolO
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallBoolSmallJson (smallJsont *self, smallBoolt *value);
-#define setTopNFreeSmallDoubleO(self, value) (self)->f->setTopNFreeSmallDouble(self, value)
-#define setTopNFreeSmallDoubleG setTopNFreeSmallDoubleO
+bool cropElemAtBoolSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtDoubleO(self, index) (self)->f->cropElemAtDouble(self, index)
+#define cropElemAtDoubleG cropElemAtDoubleO
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallDoubleSmallJson(smallJsont *self, smallDoublet *value);
-#define setTopNFreeSmallIntO(self, value) (self)->f->setTopNFreeSmallInt(self, value)
-#define setTopNFreeSmallIntG setTopNFreeSmallIntO
+double cropElemAtDoubleSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtIntO(self, index) (self)->f->cropElemAtInt(self, index)
+#define cropElemAtIntG cropElemAtIntO
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallIntSmallJson (smallJsont *self, smallIntt *value);
-#define setTopNFreeSmallStringO(self, value) (self)->f->setTopNFreeSmallString(self, value)
-#define setTopNFreeSmallStringG setTopNFreeSmallStringO
+int64_t cropElemAtIntSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtInt32O(self, index) (self)->f->cropElemAtInt32(self, index)
+#define cropElemAtInt32G cropElemAtInt32O
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallStringSmallJson(smallJsont *self, smallStringt *value);
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
/*
- * set top object in self and free value container
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
* \param
- * value object to set in self
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* setTopNFreeSmallStringSmallJson(smallJsont *self, smallStringt *value);
-#define fromArrayDictO(self, items) (self)->f->fromArrayDict(self, items)
-#define fromArrayDictG fromArrayDictO
+int32_t cropElemAtInt32SmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtUintO(self, index) (self)->f->cropElemAtUint(self, index)
+#define cropElemAtUintG cropElemAtUintO
/*
- * convert array to dictionary
- *
- * The array must have the format:
- * [[key(string), value], ...]
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * Elements not in this format are not added to the dictionary
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* fromArrayDictSmallJson (smallJsont *self, smallArrayt *items);
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
/*
- * convert array to dictionary
- *
- * The array must have the format:
- * [[key(string), value], ...]
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * Elements not in this format are not added to the dictionary
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallJsont* fromArrayDictSmallJson (smallJsont *self, smallArrayt *items);
-#define toArrayDictO(self) (self)->f->toArrayDict(self)
-#define toArrayDictG toArrayDictO
+uint64_t cropElemAtUintSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtUint32O(self, index) (self)->f->cropElemAtUint32(self, index)
+#define cropElemAtUint32G cropElemAtUint32O
/*
- * convert dictionary to array
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * Array format:
- * [[key, value], ...]
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* toArrayDictSmallJson (smallJsont *self);
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
/*
- * convert dictionary to array
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * Array format:
- * [[key, value], ...]
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-smallArrayt* toArrayDictSmallJson (smallJsont *self);
-#define getTopUndefinedO(self) (self)->f->getTopUndefined(self)
-#define getTopUndefinedG getTopUndefinedO
+uint32_t cropElemAtUint32SmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSO(self, index) (self)->f->cropElemAtS(self, index)
+#define cropElemAtSG cropElemAtSO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* getTopUndefinedSmallJson (smallJsont *self);
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-undefinedt* getTopUndefinedSmallJson (smallJsont *self);
-#define getTopBoolO(self) (self)->f->getTopBool(self)
-#define getTopBoolG getTopBoolO
+char* cropElemAtSSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtCharO(self, index) (self)->f->cropElemAtChar(self, index)
+#define cropElemAtCharG cropElemAtCharO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool getTopBoolSmallJson (smallJsont *self);
+char cropElemAtCharSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool getTopBoolSmallJson (smallJsont *self);
-#define getTopBoolPO(self) (self)->f->getTopBoolP(self)
-#define getTopBoolPG getTopBoolPO
+char cropElemAtCharSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtDictO(self, index) (self)->f->cropElemAtDict(self, index)
+#define cropElemAtDictG cropElemAtDictO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool* getTopBoolPSmallJson (smallJsont *self);
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-bool* getTopBoolPSmallJson (smallJsont *self);
-#define getTopDoubleO(self) (self)->f->getTopDouble(self)
-#define getTopDoubleG getTopDoubleO
+smallDictt* cropElemAtDictSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtArrayO(self, index) (self)->f->cropElemAtArray(self, index)
+#define cropElemAtArrayG cropElemAtArrayO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double getTopDoubleSmallJson (smallJsont *self);
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double getTopDoubleSmallJson (smallJsont *self);
-#define getTopDoublePO(self) (self)->f->getTopDoubleP(self)
-#define getTopDoublePG getTopDoublePO
+smallArrayt* cropElemAtArraySmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallBoolO(self, index) (self)->f->cropElemAtSmallBool(self, index)
+#define cropElemAtSmallBoolG cropElemAtSmallBoolO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double* getTopDoublePSmallJson (smallJsont *self);
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-double* getTopDoublePSmallJson (smallJsont *self);
-#define getTopIntO(self) (self)->f->getTopInt(self)
-#define getTopIntG getTopIntO
+smallBoolt* cropElemAtSmallBoolSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallBytesO(self, index) (self)->f->cropElemAtSmallBytes(self, index)
+#define cropElemAtSmallBytesG cropElemAtSmallBytesO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t getTopIntSmallJson (smallJsont *self);
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t getTopIntSmallJson (smallJsont *self);
-#define getTopIntPO(self) (self)->f->getTopIntP(self)
-#define getTopIntPG getTopIntPO
+smallBytest* cropElemAtSmallBytesSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallDoubleO(self, index) (self)->f->cropElemAtSmallDouble(self, index)
+#define cropElemAtSmallDoubleG cropElemAtSmallDoubleO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t* getTopIntPSmallJson (smallJsont *self);
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int64_t* getTopIntPSmallJson (smallJsont *self);
-#define getTopInt32O(self) (self)->f->getTopInt32(self)
-#define getTopInt32G getTopInt32O
+smallDoublet* cropElemAtSmallDoubleSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallIntO(self, index) (self)->f->cropElemAtSmallInt(self, index)
+#define cropElemAtSmallIntG cropElemAtSmallIntO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t getTopInt32SmallJson (smallJsont *self);
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t getTopInt32SmallJson (smallJsont *self);
-#define getTopInt32PO(self) (self)->f->getTopInt32P(self)
-#define getTopInt32PG getTopInt32PO
+smallIntt* cropElemAtSmallIntSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallStringO(self, index) (self)->f->cropElemAtSmallString(self, index)
+#define cropElemAtSmallStringG cropElemAtSmallStringO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t* getTopInt32PSmallJson (smallJsont *self);
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-int32_t* getTopInt32PSmallJson (smallJsont *self);
-#define getTopUintO(self) (self)->f->getTopUint(self)
-#define getTopUintG getTopUintO
+smallStringt* cropElemAtSmallStringSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtVoidO(self, index) (self)->f->cropElemAtVoid(self, index)
+#define cropElemAtVoidG cropElemAtVoidO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t getTopUintSmallJson (smallJsont *self);
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t getTopUintSmallJson (smallJsont *self);
-#define getTopUintPO(self) (self)->f->getTopUintP(self)
-#define getTopUintPG getTopUintPO
+void* cropElemAtVoidSmallJson (smallJsont *self, intmax_t index);
+#define cropElemAtSmallContainerO(self, index) (self)->f->cropElemAtSmallContainer(self, index)
+#define cropElemAtSmallContainerG cropElemAtSmallContainerO
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t* getTopUintPSmallJson (smallJsont *self);
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
/*
- * get a baset object with the top object from self inside
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
*/
-uint64_t* getTopUintPSmallJson (smallJsont *self);
-#define getTopUint32O(self) (self)->f->getTopUint32(self)
-#define getTopUint32G getTopUint32O
+smallContainert* cropElemAtSmallContainerSmallJson (smallJsont *self, intmax_t index);
+#define cropElemKeyO(self, key) (self)->f->cropElemKey(self, key)
+#define cropElemKeyG cropElemKeyO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-uint32_t getTopUint32SmallJson (smallJsont *self);
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-uint32_t getTopUint32SmallJson (smallJsont *self);
-#define getTopUint32PO(self) (self)->f->getTopUint32P(self)
-#define getTopUint32PG getTopUint32PO
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-uint32_t* getTopUint32PSmallJson (smallJsont *self);
+baset* cropElemKeySmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-uint32_t* getTopUint32PSmallJson (smallJsont *self);
-#define getTopSO(self) (self)->f->getTopS(self)
-#define getTopSG getTopSO
+smallJsont* cropElemKeySmallJsonSmallJson (smallJsont *self, char* key);
+#define cropElemKeyUndefinedO(self, key) (self)->f->cropElemKeyUndefined(self, key)
+#define cropElemKeyUndefinedG cropElemKeyUndefinedO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* getTopSSmallJson (smallJsont *self);
+undefinedt* cropElemKeyUndefinedSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* getTopSSmallJson (smallJsont *self);
-#define getTopDictO(self) (self)->f->getTopDict(self)
-#define getTopDictG getTopDictO
+undefinedt* cropElemKeyUndefinedSmallJson (smallJsont *self, char* key);
+#define cropElemKeyBoolO(self, key) (self)->f->cropElemKeyBool(self, key)
+#define cropElemKeyBoolG cropElemKeyBoolO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallDictt* getTopDictSmallJson (smallJsont *self);
+bool cropElemKeyBoolSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallDictt* getTopDictSmallJson (smallJsont *self);
-#define getTopArrayO(self) (self)->f->getTopArray(self)
-#define getTopArrayG getTopArrayO
+bool cropElemKeyBoolSmallJson (smallJsont *self, char* key);
+#define cropElemKeyDoubleO(self, key) (self)->f->cropElemKeyDouble(self, key)
+#define cropElemKeyDoubleG cropElemKeyDoubleO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* getTopArraySmallJson (smallJsont *self);
+double cropElemKeyDoubleSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallArrayt* getTopArraySmallJson (smallJsont *self);
-#define getTopSmallBoolO(self) (self)->f->getTopSmallBool(self)
-#define getTopSmallBoolG getTopSmallBoolO
+double cropElemKeyDoubleSmallJson (smallJsont *self, char* key);
+#define cropElemKeyIntO(self, key) (self)->f->cropElemKeyInt(self, key)
+#define cropElemKeyIntG cropElemKeyIntO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallBoolt* getTopSmallBoolSmallJson (smallJsont *self);
+int64_t cropElemKeyIntSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallBoolt* getTopSmallBoolSmallJson (smallJsont *self);
-#define getTopSmallDoubleO(self) (self)->f->getTopSmallDouble(self)
-#define getTopSmallDoubleG getTopSmallDoubleO
+int64_t cropElemKeyIntSmallJson (smallJsont *self, char* key);
+#define cropElemKeyInt32O(self, key) (self)->f->cropElemKeyInt32(self, key)
+#define cropElemKeyInt32G cropElemKeyInt32O
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallDoublet* getTopSmallDoubleSmallJson(smallJsont *self);
+int32_t cropElemKeyInt32SmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallDoublet* getTopSmallDoubleSmallJson(smallJsont *self);
-#define getTopSmallIntO(self) (self)->f->getTopSmallInt(self)
-#define getTopSmallIntG getTopSmallIntO
+int32_t cropElemKeyInt32SmallJson (smallJsont *self, char* key);
+#define cropElemKeyUintO(self, key) (self)->f->cropElemKeyUint(self, key)
+#define cropElemKeyUintG cropElemKeyUintO
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallIntt* getTopSmallIntSmallJson (smallJsont *self);
+uint64_t cropElemKeyUintSmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallIntt* getTopSmallIntSmallJson (smallJsont *self);
-#define getTopSmallStringO(self) (self)->f->getTopSmallString(self)
-#define getTopSmallStringG getTopSmallStringO
+uint64_t cropElemKeyUintSmallJson (smallJsont *self, char* key);
+#define cropElemKeyUint32O(self, key) (self)->f->cropElemKeyUint32(self, key)
+#define cropElemKeyUint32G cropElemKeyUint32O
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* getTopSmallStringSmallJson(smallJsont *self);
+uint32_t cropElemKeyUint32SmallJson (smallJsont *self, char* key);
/*
- * get a baset object with the top object from self inside
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
- * when the object is reallocated use setTop function to update the pointer in self
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallStringt* getTopSmallStringSmallJson(smallJsont *self);
-#define keyIsO(self, key) (self)->f->keyIs(self, key)
-#define keyIsG keyIsO
+uint32_t cropElemKeyUint32SmallJson (smallJsont *self, char* key);
+#define cropElemKeySO(self, key) (self)->f->cropElemKeyS(self, key)
+#define cropElemKeySG cropElemKeySO
/*
- * keyIs
- * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
- *
- * use the jsonPathResS[] array to convert the result to string (or use keyIsS to get the result as string directly)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key any key or path in self
+ * key must exist in the dictionary
* \return
- * key type (enum int)
- * 0 (KEY_IS_NULL in enum) when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-jsonPathRest keyIsSmallJson (smallJsont *self, const char *key);
+char* cropElemKeySSmallJson (smallJsont *self, char* key);
/*
- * keyIs
- * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
- *
- * use the jsonPathResS[] array to convert the result to string (or use keyIsS to get the result as string directly)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key any key or path in self
+ * key must exist in the dictionary
* \return
- * key type (enum int)
- * 0 (KEY_IS_NULL in enum) when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-jsonPathRest keyIsSmallJson (smallJsont *self, const char *key);
-#define keyIsSO(self, key) (self)->f->keyIsS(self, key)
-#define keyIsSG keyIsSO
+char* cropElemKeySSmallJson (smallJsont *self, char* key);
+#define cropElemKeyDictO(self, key) (self)->f->cropElemKeyDict(self, key)
+#define cropElemKeyDictG cropElemKeyDictO
/*
- * keyIs returning result as string
- * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key any key or path in self
+ * key must exist in the dictionary
* \return
- * key type
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* keyIsSSmallJson (smallJsont *self, const char *key);
+smallDictt* cropElemKeyDictSmallJson (smallJsont *self, char* key);
/*
- * keyIs returning result as string
- * determine json key type: dictionary key, json path starting from an array or json path starting from a dictionary
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key any key or path in self
+ * key must exist in the dictionary
* \return
- * key type
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-const char* keyIsSSmallJson (smallJsont *self, const char *key);
-#define makeKeyO(self, key) (self)->f->makeKey(self, key)
-#define makeKeyG makeKeyO
+smallDictt* cropElemKeyDictSmallJson (smallJsont *self, char* key);
+#define cropElemKeyArrayO(self, key) (self)->f->cropElemKeyArray(self, key)
+#define cropElemKeyArrayG cropElemKeyArrayO
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
+ * key must exist in the dictionary
* \return
- * new dictionary key (you must free this buffer)
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* makeKeySmallJson (smallJsont *self, const char *key);
+smallArrayt* cropElemKeyArraySmallJson (smallJsont *self, char* key);
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
+ * key must exist in the dictionary
* \return
- * new dictionary key (you must free this buffer)
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* makeKeySmallJson (smallJsont *self, const char *key);
-#define iMakeKeyO(self, key) (self)->f->iMakeKey(self, key)
-#define iMakeKeyG iMakeKeyO
+smallArrayt* cropElemKeyArraySmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallBoolO(self, key) (self)->f->cropElemKeySmallBool(self, key)
+#define cropElemKeySmallBoolG cropElemKeySmallBoolO
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key pointer to key to transform (this parameter is reallocated)
+ * key must exist in the dictionary
* \return
- * new dictionary key (you must free this buffer)
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* iMakeKeySmallJson (smallJsont *self, char **key);
+smallBoolt* cropElemKeySmallBoolSmallJson (smallJsont *self, char* key);
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key pointer to key to transform (this parameter is reallocated)
+ * key must exist in the dictionary
* \return
- * new dictionary key (you must free this buffer)
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* iMakeKeySmallJson (smallJsont *self, char **key);
-#define bMakeKeyO(self, dest, key) (self)->f->bMakeKey(self, dest, key)
-#define bMakeKeyG bMakeKeyO
+smallBoolt* cropElemKeySmallBoolSmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallBytesO(self, key) (self)->f->cropElemKeySmallBytes(self, key)
+#define cropElemKeySmallBytesG cropElemKeySmallBytesO
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
- * the result is stored dest, dest must be big enough (at least makeKeyLen+1)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
- * \param
- * dest result buffer
+ * key must exist in the dictionary
* \return
- * dictionary key in dest
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* bMakeKeySmallJson (smallJsont *self, char *dest, const char *key);
+smallBytest* cropElemKeySmallBytesSmallJson (smallJsont *self, char* key);
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
- * the result is stored dest, dest must be big enough (at least makeKeyLen+1)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
- * \param
- * dest result buffer
+ * key must exist in the dictionary
* \return
- * dictionary key in dest
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* bMakeKeySmallJson (smallJsont *self, char *dest, const char *key);
-#define bLMakeKeyO(self, dest, size, key) (self)->f->bLMakeKey(self, dest, size, key)
-#define bLMakeKeyG bLMakeKeyO
+smallBytest* cropElemKeySmallBytesSmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallDoubleO(self, key) (self)->f->cropElemKeySmallDouble(self, key)
+#define cropElemKeySmallDoubleG cropElemKeySmallDoubleO
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
- * the result is stored dest, dest size must be big enough (at least makeKeyLen+1)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
- * \param
- * dest result buffer
- * \param
- * size dest buffer size
+ * key must exist in the dictionary
* \return
- * dictionary key in dest
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* bLMakeKeySmallJson (smallJsont *self, char *dest, size_t size, const char *key);
+smallDoublet* cropElemKeySmallDoubleSmallJson (smallJsont *self, char* key);
/*
- * make json key
- * escape " and \ characters and add quotes to prevent misinterpreting the key as a json path
- * the result is stored dest, dest size must be big enough (at least makeKeyLen+1)
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
- * \param
- * dest result buffer
- * \param
- * size dest buffer size
+ * key must exist in the dictionary
* \return
- * dictionary key in dest
- * NULL when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-char* bLMakeKeySmallJson (smallJsont *self, char *dest, size_t size, const char *key);
-#define makeKeyLenO(self, key) (self)->f->makeKeyLen(self, key)
-#define makeKeyLenG makeKeyLenO
+smallDoublet* cropElemKeySmallDoubleSmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallIntO(self, key) (self)->f->cropElemKeySmallInt(self, key)
+#define cropElemKeySmallIntG cropElemKeySmallIntO
/*
- * return key length after running makeKey
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
+ * key must exist in the dictionary
* \return
- * dictionary key length
- * 0 when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-size_t makeKeyLenSmallJson(smallJsont *self, const char *key);
+smallIntt* cropElemKeySmallIntSmallJson (smallJsont *self, char* key);
/*
- * return key length after running makeKey
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * key key to transform
+ * key must exist in the dictionary
* \return
- * dictionary key length
- * 0 when key is NULL
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-size_t makeKeyLenSmallJson(smallJsont *self, const char *key);
-#define mergeDictO(self, smallDict) (self)->f->mergeDict(self, smallDict)
-#define mergeDictG mergeDictO
+smallIntt* cropElemKeySmallIntSmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallStringO(self, key) (self)->f->cropElemKeySmallString(self, key)
+#define cropElemKeySmallStringG cropElemKeySmallStringO
/*
- * merge override - already existing values are replaced
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* mergeDictSmallJson (smallJsont *self, smallDictt *smallDict);
+smallStringt* cropElemKeySmallStringSmallJson (smallJsont *self, char* key);
/*
- * merge override - already existing values are replaced
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* mergeDictSmallJson (smallJsont *self, smallDictt *smallDict);
-#define mergeDictNSmashO(self, smallDict) (self)->f->mergeDictNSmash(self, smallDict)
-#define mergeDictNSmashG mergeDictNSmashO
+smallStringt* cropElemKeySmallStringSmallJson (smallJsont *self, char* key);
+#define cropElemKeyVoidO(self, key) (self)->f->cropElemKeyVoid(self, key)
+#define cropElemKeyVoidG cropElemKeyVoidO
/*
- * merge override - already existing values are replaced
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* mergeDictNSmashSmallJson (smallJsont *self, smallDictt *smallDict);
+void* cropElemKeyVoidSmallJson (smallJsont *self, char* key);
/*
- * merge override - already existing values are replaced
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* mergeDictNSmashSmallJson (smallJsont *self, smallDictt *smallDict);
-#define addJsonO(self, array) (self)->f->addJson(self, array)
-#define addJsonG addJsonO
+void* cropElemKeyVoidSmallJson (smallJsont *self, char* key);
+#define cropElemKeySmallContainerO(self, key) (self)->f->cropElemKeySmallContainer(self, key)
+#define cropElemKeySmallContainerG cropElemKeySmallContainerO
/*
- * add self and list in a new list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * list
+ * key must exist in the dictionary
* \return
- * new list with self and list
- * empty list when self and list are NULL or empty
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* addJsonSmallJson (smallJsont *self, smallJsont *array);
+smallContainert* cropElemKeySmallContainerSmallJson (smallJsont *self, char* key);
/*
- * add self and list in a new list
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
*
* \param
- * list
+ * key must exist in the dictionary
* \return
- * new list with self and list
- * empty list when self and list are NULL or empty
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
*/
-smallJsont* addJsonSmallJson (smallJsont *self, smallJsont *array);
+smallContainert* cropElemKeySmallContainerSmallJson (smallJsont *self, char* key);
#define insertJsonO(self, index, toInsert) (self)->f->insertJson(self, index, toInsert)
#define insertJsonG insertJsonO
/*
@@ -75171,6 +82086,17 @@ bool writeTextStreamG(char **list, FILE *fp);
bool writeTextCG(const char **list, const char *filePath);
bool writeTextStreamCG(const char **list, FILE *fp);
/*
+ * call appendFileS (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendFileSG(const char *string, const char *filePath);
+/*
+ * call appendText (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendTextSG(char **list, const char *filePath);
+bool appendTextCG(const char **list, const char *filePath);
+/*
* recursive mkdir
*
* \param
diff --git a/release/json/libsheepyCSmallArray.h b/release/json/libsheepyCSmallArray.h
@@ -135,11 +135,14 @@ typedef smallArrayt* (*fromArrayNFreeSmallArrayFt)(smallArrayt *self,
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
typedef smallArrayt* (*pushSmallArrayFt) (smallArrayt *self, baset *value);
typedef smallArrayt* (*pushUndefinedSmallArrayFt) (smallArrayt *self);
@@ -272,6 +275,9 @@ typedef double (*popNumSmallArrayFt) (smallArrayt *self);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -441,6 +447,62 @@ typedef smallArrayt* (*addSmallArrayFt) (smallArrayt *self, small
typedef smallArrayt* (*sliceSmallArrayFt) (smallArrayt *self, intmax_t start, intmax_t end);
/**
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
+ *
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallArrayt* (*cropSmallArrayFt) (smallArrayt *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
+ */
+typedef baset* (*cropElemSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef undefinedt* (*cropElemUndefinedSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef bool (*cropElemBoolSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef double (*cropElemDoubleSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef int64_t (*cropElemIntSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef int32_t (*cropElemInt32SmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef uint64_t (*cropElemUintSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef uint32_t (*cropElemUint32SmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef char* (*cropElemSSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallDictt* (*cropElemDictSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallArrayt* (*cropElemArraySmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallBoolt* (*cropElemSmallBoolSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallBytest* (*cropElemSmallBytesSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallDoublet* (*cropElemSmallDoubleSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallIntt* (*cropElemSmallIntSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallJsont* (*cropElemSmallJsonSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallStringt* (*cropElemSmallStringSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef void* (*cropElemVoidSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallContainert* (*cropElemSmallContainerSmallArrayFt) (smallArrayt *self, intmax_t index);
+
+/**
* keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
@@ -725,6 +787,9 @@ typedef smallContainert* (*getAtNDupSmallContainerSmallArrayFt)(smallArrayt *sel
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -1422,6 +1487,26 @@ typedef bool (*areAllEBytesSmallArrayFt) (smallArrayt *self);
shiftNSmashSmallJsonSmallArrayFt shiftNSmashSmallJson;\
addSmallArrayFt add;\
sliceSmallArrayFt slice;\
+ cropSmallArrayFt crop;\
+ cropElemSmallArrayFt cropElem;\
+ cropElemUndefinedSmallArrayFt cropElemUndefined;\
+ cropElemBoolSmallArrayFt cropElemBool;\
+ cropElemDoubleSmallArrayFt cropElemDouble;\
+ cropElemIntSmallArrayFt cropElemInt;\
+ cropElemInt32SmallArrayFt cropElemInt32;\
+ cropElemUintSmallArrayFt cropElemUint;\
+ cropElemUint32SmallArrayFt cropElemUint32;\
+ cropElemSSmallArrayFt cropElemS;\
+ cropElemDictSmallArrayFt cropElemDict;\
+ cropElemArraySmallArrayFt cropElemArray;\
+ cropElemSmallBoolSmallArrayFt cropElemSmallBool;\
+ cropElemSmallBytesSmallArrayFt cropElemSmallBytes;\
+ cropElemSmallDoubleSmallArrayFt cropElemSmallDouble;\
+ cropElemSmallIntSmallArrayFt cropElemSmallInt;\
+ cropElemSmallJsonSmallArrayFt cropElemSmallJson;\
+ cropElemSmallStringSmallArrayFt cropElemSmallString;\
+ cropElemVoidSmallArrayFt cropElemVoid;\
+ cropElemSmallContainerSmallArrayFt cropElemSmallContainer;\
copySmallArrayFt copy;\
insertSmallArrayFt insert;\
insertSmallJsonSmallArrayFt insertSmallJson;\
@@ -1731,6 +1816,12 @@ struct smallArray {
ssize_t iterIndex;
intmax_t iterStep;
baset* iterElement;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
};
// smallArray
@@ -1987,6 +2078,26 @@ smallArrayt* shiftNSmashSmallJsonSmallArrayG (smallArrayt *self, smallJsont *jso
smallArrayt* addSmallArrayG (smallArrayt *self, smallArrayt *array);
smallArrayt* sliceSmallArrayG(smallArrayt *self, intmax_t start, intmax_t end);
+smallArrayt* cropSmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index);
+undefinedt* cropElemUndefinedSmallArrayG (smallArrayt *self, intmax_t index);
+bool cropElemBoolSmallArrayG (smallArrayt *self, intmax_t index);
+double cropElemDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+int64_t cropElemIntSmallArrayG (smallArrayt *self, intmax_t index);
+int32_t cropElemInt32SmallArrayG (smallArrayt *self, intmax_t index);
+uint64_t cropElemUintSmallArrayG (smallArrayt *self, intmax_t index);
+uint32_t cropElemUint32SmallArrayG (smallArrayt *self, intmax_t index);
+char* cropElemSSmallArrayG (smallArrayt *self, intmax_t index);
+smallDictt* cropElemDictSmallArrayG (smallArrayt *self, intmax_t index);
+smallArrayt* cropElemArraySmallArrayG (smallArrayt *self, intmax_t index);
+smallBoolt* cropElemSmallBoolSmallArrayG (smallArrayt *self, intmax_t index);
+smallBytest* cropElemSmallBytesSmallArrayG (smallArrayt *self, intmax_t index);
+smallDoublet* cropElemSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+smallIntt* cropElemSmallIntSmallArrayG (smallArrayt *self, intmax_t index);
+smallJsont* cropElemSmallJsonSmallArrayG (smallArrayt *self, intmax_t index);
+smallStringt* cropElemSmallStringSmallArrayG (smallArrayt *self, intmax_t index);
+void* cropElemVoidSmallArrayG (smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainerSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
smallArrayt* insertSmallArrayG (smallArrayt *self, intmax_t index, smallArrayt *toInsert);
smallArrayt* insertSmallJsonSmallArrayG (smallArrayt *self, intmax_t index, smallJsont *toInsert);
@@ -2164,6 +2275,7 @@ bool writeTextSmallArrayG (smallArrayt *self, const char *filePath);
bool writeTextSmallJsonSmallArrayG (smallArrayt *self, smallJsont *filePath);
bool writeTextSmallStringSmallArrayG (smallArrayt *self, smallStringt *filePath);
bool writeStreamSmallArrayG (smallArrayt *self, FILE *fp);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
bool appendTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath);
smallStringt* typeSmallStringSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* typeSmallStringsSmallArrayG(smallArrayt *self);
diff --git a/release/json/libsheepyCSmallContainer.h b/release/json/libsheepyCSmallContainer.h
@@ -34,17 +34,17 @@ typedef struct smallContainer smallContainert;
// for object inheriting smallContainer, cast to smallContainer to be able to use this class functions and generics
#define cCo(self) ( (smallContainert*) self )
-typedef void (*freeSmallContainerFt) (smallContainert *self);
-typedef void (*terminateSmallContainerFt) (smallContainert **self);
-typedef char* (*toStringSmallContainerFt) (smallContainert *self);
+typedef void (*freeSmallContainerFt) (smallContainert *self);
+typedef void (*terminateSmallContainerFt) (smallContainert **self);
+typedef char* (*toStringSmallContainerFt) (smallContainert *self);
typedef smallContainert* (*duplicateSmallContainerFt) (smallContainert *self);
/**
* free container
*/
-typedef void (*finishSmallContainerFt) (smallContainert **self);
+typedef void (*finishSmallContainerFt) (smallContainert **self);
-typedef const char* (*helpSmallContainerFt) (smallContainert *self);
+typedef const char* (*helpSmallContainerFt) (smallContainert *self);
// smallContainer functions
/**
@@ -53,7 +53,7 @@ typedef const char* (*helpSmallContainerFt) (smallContainert *self);
* \param
* data pointer to buffer in container
*/
-typedef void (*dataFreeSmallContainerFt) (void *data);
+typedef void (*dataFreeSmallContainerFt) (void *data);
/**
* set function to free container data in the class
@@ -63,7 +63,7 @@ typedef void (*dataFreeSmallContainerFt) (void *data);
* \param
* free user provided function to free the data in the container
*/
-typedef smallContainert* (*setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
+typedef smallContainert* (*setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
/**
* set function to free container data in self
@@ -71,7 +71,7 @@ typedef smallContainert* (*setClassDataFreeSmallContainerFt) (small
* \param
* free user provided function to free the data in the container
*/
-typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
+typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
/**
* prototype for user provided toString function
@@ -79,7 +79,7 @@ typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (small
* \param
* data pointer to buffer in container
*/
-typedef char* (*dataToStringSmallContainerFt) (void *data);
+typedef char* (*dataToStringSmallContainerFt) (void *data);
/**
* set function to stringify container data in the class
@@ -87,7 +87,7 @@ typedef char* (*dataToStringSmallContainerFt) (void *data);
* \param
* toString user provided function to stringify the data in the container
*/
-typedef smallContainert* (*setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
+typedef smallContainert* (*setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
/**
* set function to stringify container data in self
@@ -95,7 +95,7 @@ typedef smallContainert* (*setClassDataToStringSmallContainerFt) (small
* \param
* toString user provided function to stringify the data in the container
*/
-typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
+typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
/**
* prototype for user provided duplicate function
@@ -103,7 +103,7 @@ typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (small
* \param
* data pointer to buffer in container
*/
-typedef void* (*dataDuplicateSmallContainerFt) (void *data);
+typedef void* (*dataDuplicateSmallContainerFt) (void *data);
/**
* set function to duplicate container data in the class
@@ -111,7 +111,7 @@ typedef void* (*dataDuplicateSmallContainerFt) (void *data);
* \param
* duplicate user provided function to duplicate the data in the container
*/
-typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
/**
* set function to duplicate container data in self
@@ -119,12 +119,12 @@ typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (small
* \param
* duplicate user provided function to duplicate the data in the container
*/
-typedef smallContainert* (*setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+typedef smallContainert* (*setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
/**
* free self but not the data inside
*/
-typedef void (*smashSmallContainerFt) (smallContainert **self);
+typedef void (*smashSmallContainerFt) (smallContainert **self);
/**
* get a copy of smallContainer
@@ -134,7 +134,7 @@ typedef void (*smashSmallContainerFt) (smallContainert *
* \return
* char*
*/
-typedef void* (*getSmallContainerFt) (smallContainert *self);
+typedef void* (*getSmallContainerFt) (smallContainert *self);
/**
* set smallContainer
@@ -142,7 +142,7 @@ typedef void* (*getSmallContainerFt) (smallContainert *self);
* \param
* string buffer to store in object (the buffer is duplicated)
*/
-typedef smallContainert* (*setSmallContainerFt) (smallContainert *self, void *data);
+typedef smallContainert* (*setSmallContainerFt) (smallContainert *self, void *data);
/**
* class functions
@@ -189,14 +189,14 @@ typedef struct {
* class
*/
struct smallContainer {
- const char *type;
- smallContainerFunctionst *f;
+ const char *type;
+ smallContainerFunctionst *f;
/** pointer to data in smallContainer */
- sContainert *data;
- dataFreeSmallContainerFt dataFree;
- dataToStringSmallContainerFt dataToString;
- dataDuplicateSmallContainerFt dataDuplicate;
+ sContainert *data;
+ dataFreeSmallContainerFt dataFree;
+ dataToStringSmallContainerFt dataToString;
+ dataDuplicateSmallContainerFt dataDuplicate;
};
// smallContainer
diff --git a/release/json/libsheepyCSmallDict.h b/release/json/libsheepyCSmallDict.h
@@ -349,6 +349,38 @@ typedef smallContainert* (*getNDupSmallContainerKCharSmallDictFt)(smallDictt *se
typedef double (*getNumSmallDictFt) (smallDictt *self, const char *key);
/**
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
+ */
+typedef baset* (*cropElemSmallDictFt) (smallDictt *self, char* key);
+typedef undefinedt* (*cropElemUndefinedSmallDictFt) (smallDictt *self, char* key);
+typedef bool (*cropElemBoolSmallDictFt) (smallDictt *self, char* key);
+typedef double (*cropElemDoubleSmallDictFt) (smallDictt *self, char* key);
+typedef int64_t (*cropElemIntSmallDictFt) (smallDictt *self, char* key);
+typedef int32_t (*cropElemInt32SmallDictFt) (smallDictt *self, char* key);
+typedef uint64_t (*cropElemUintSmallDictFt) (smallDictt *self, char* key);
+typedef uint32_t (*cropElemUint32SmallDictFt) (smallDictt *self, char* key);
+typedef char* (*cropElemSSmallDictFt) (smallDictt *self, char* key);
+typedef smallDictt* (*cropElemDictSmallDictFt) (smallDictt *self, char* key);
+typedef smallArrayt* (*cropElemArraySmallDictFt) (smallDictt *self, char* key);
+typedef smallBoolt* (*cropElemSmallBoolSmallDictFt) (smallDictt *self, char* key);
+typedef smallBytest* (*cropElemSmallBytesSmallDictFt) (smallDictt *self, char* key);
+typedef smallDoublet* (*cropElemSmallDoubleSmallDictFt) (smallDictt *self, char* key);
+typedef smallIntt* (*cropElemSmallIntSmallDictFt) (smallDictt *self, char* key);
+typedef smallJsont* (*cropElemSmallJsonSmallDictFt) (smallDictt *self, char* key);
+typedef smallStringt* (*cropElemSmallStringSmallDictFt) (smallDictt *self, char* key);
+typedef void* (*cropElemVoidSmallDictFt) (smallDictt *self, char* key);
+typedef smallContainert* (*cropElemSmallContainerSmallDictFt) (smallDictt *self, char* key);
+
+/**
* delete element
*
* free element sObject for given key
@@ -847,7 +879,26 @@ typedef bool (*areAllEBytesSmallDictFt) (smallDictt *self);
getNDupSmallStringKCharSmallDictFt getNDupSmallStringKChar;\
getNDupVoidKCharSmallDictFt getNDupVoidKChar;\
getNDupSmallContainerKCharSmallDictFt getNDupSmallContainerKChar;\
- getNumSmallDictFt getNum;\
+ getNumSmallDictFt getNum;\
+ cropElemSmallDictFt cropElem;\
+ cropElemUndefinedSmallDictFt cropElemUndefined;\
+ cropElemBoolSmallDictFt cropElemBool;\
+ cropElemDoubleSmallDictFt cropElemDouble;\
+ cropElemIntSmallDictFt cropElemInt;\
+ cropElemInt32SmallDictFt cropElemInt32;\
+ cropElemUintSmallDictFt cropElemUint;\
+ cropElemUint32SmallDictFt cropElemUint32;\
+ cropElemSSmallDictFt cropElemS;\
+ cropElemDictSmallDictFt cropElemDict;\
+ cropElemArraySmallDictFt cropElemArray;\
+ cropElemSmallBoolSmallDictFt cropElemSmallBool;\
+ cropElemSmallBytesSmallDictFt cropElemSmallBytes;\
+ cropElemSmallDoubleSmallDictFt cropElemSmallDouble;\
+ cropElemSmallIntSmallDictFt cropElemSmallInt;\
+ cropElemSmallJsonSmallDictFt cropElemSmallJson;\
+ cropElemSmallStringSmallDictFt cropElemSmallString;\
+ cropElemVoidSmallDictFt cropElemVoid;\
+ cropElemSmallContainerSmallDictFt cropElemSmallContainer;\
delSmallDictFt del;\
delKCharSmallDictFt delKChar;\
hasSmallDictFt has;\
@@ -972,6 +1023,12 @@ struct smallDict {
ssize_t iterIndex;
char* iterKey;
baset* iterElement;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
};
// base
@@ -1212,6 +1269,25 @@ bool icEqualSmallDictBaseG (smallDictt* self, baset* p2);
bool icEqualSmallDictSmallJsonG(smallDictt* self, smallJsont* p2);
bool icEqualSmallDictG (smallDictt* self, smallDictt* p2);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key);
+bool cropElemBoolSmallDictG (smallDictt *self, char* key);
+double cropElemDoubleSmallDictG (smallDictt *self, char* key);
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key);
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key);
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key);
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key);
+char* cropElemSSmallDictG (smallDictt *self, char* key);
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key);
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key);
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key);
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key);
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key);
+void* cropElemVoidSmallDictG (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key);
smallDictt* delSmallDictG (smallDictt *self, const char *key, int unused UNUSED);
smallDictt* delKCharSmallDictG (smallDictt *self, char key, int unused UNUSED);
smallDictt* delElemSmallDictG (smallDictt *self, const char *key);
diff --git a/release/json/libsheepyCSmallJson.h b/release/json/libsheepyCSmallJson.h
@@ -1039,6 +1039,97 @@ typedef smallJsont* (*addJsonSmallJsonFt) (smallJsont *self, smallJso
typedef smallJsont* (*sliceSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
/**
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
+ *
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallJsont* (*cropSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+typedef char* (*cropSSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+typedef smallStringt* (*cropSmallStringSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
+ */
+typedef baset* (*cropElemAtSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef undefinedt* (*cropElemAtUndefinedSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef bool (*cropElemAtBoolSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef double (*cropElemAtDoubleSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef int64_t (*cropElemAtIntSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef int32_t (*cropElemAtInt32SmallJsonFt) (smallJsont *self, intmax_t index);
+typedef uint64_t (*cropElemAtUintSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef uint32_t (*cropElemAtUint32SmallJsonFt) (smallJsont *self, intmax_t index);
+typedef char* (*cropElemAtSSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef char (*cropElemAtCharSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallDictt* (*cropElemAtDictSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallArrayt* (*cropElemAtArraySmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallBoolt* (*cropElemAtSmallBoolSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallBytest* (*cropElemAtSmallBytesSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallDoublet* (*cropElemAtSmallDoubleSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallIntt* (*cropElemAtSmallIntSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallJsont* (*cropElemAtSmallJsonSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallStringt* (*cropElemAtSmallStringSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef void* (*cropElemAtVoidSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallContainert* (*cropElemAtSmallContainerSmallJsonFt) (smallJsont *self, intmax_t index);
+
+/**
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
+ */
+typedef baset* (*cropElemKeySmallJsonFt) (smallJsont *self, char* key);
+typedef undefinedt* (*cropElemKeyUndefinedSmallJsonFt) (smallJsont *self, char* key);
+typedef bool (*cropElemKeyBoolSmallJsonFt) (smallJsont *self, char* key);
+typedef double (*cropElemKeyDoubleSmallJsonFt) (smallJsont *self, char* key);
+typedef int64_t (*cropElemKeyIntSmallJsonFt) (smallJsont *self, char* key);
+typedef int32_t (*cropElemKeyInt32SmallJsonFt) (smallJsont *self, char* key);
+typedef uint64_t (*cropElemKeyUintSmallJsonFt) (smallJsont *self, char* key);
+typedef uint32_t (*cropElemKeyUint32SmallJsonFt) (smallJsont *self, char* key);
+typedef char* (*cropElemKeySSmallJsonFt) (smallJsont *self, char* key);
+typedef smallDictt* (*cropElemKeyDictSmallJsonFt) (smallJsont *self, char* key);
+typedef smallArrayt* (*cropElemKeyArraySmallJsonFt) (smallJsont *self, char* key);
+typedef smallBoolt* (*cropElemKeySmallBoolSmallJsonFt) (smallJsont *self, char* key);
+typedef smallBytest* (*cropElemKeySmallBytesSmallJsonFt) (smallJsont *self, char* key);
+typedef smallDoublet* (*cropElemKeySmallDoubleSmallJsonFt) (smallJsont *self, char* key);
+typedef smallIntt* (*cropElemKeySmallIntSmallJsonFt) (smallJsont *self, char* key);
+typedef smallJsont* (*cropElemKeySmallJsonSmallJsonFt) (smallJsont *self, char* key);
+typedef smallStringt* (*cropElemKeySmallStringSmallJsonFt) (smallJsont *self, char* key);
+typedef void* (*cropElemKeyVoidSmallJsonFt) (smallJsont *self, char* key);
+typedef smallContainert* (*cropElemKeySmallContainerSmallJsonFt) (smallJsont *self, char* key);
+
+/**
* keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
@@ -2799,9 +2890,51 @@ typedef bool (*areAllEBytesSmallJsonFt) (smallJsont *self);
shiftNSmashSmallJsonFt shiftNSmash;\
shiftSmallJsonSmallJsonFt shiftSmallJson;\
shiftSmallJsonNSmashSmallJsonFt shiftSmallJsonNSmash;\
- addSmallJsonFt add;\
- addJsonSmallJsonFt addJson;\
- sliceSmallJsonFt slice;\
+ addSmallJsonFt add;\
+ addJsonSmallJsonFt addJson;\
+ sliceSmallJsonFt slice;\
+ cropSmallJsonFt crop;\
+ cropSSmallJsonFt cropS;\
+ cropSmallStringSmallJsonFt cropSmallString;\
+ cropElemAtSmallJsonFt cropElemAt;\
+ cropElemAtUndefinedSmallJsonFt cropElemAtUndefined;\
+ cropElemAtBoolSmallJsonFt cropElemAtBool;\
+ cropElemAtDoubleSmallJsonFt cropElemAtDouble;\
+ cropElemAtIntSmallJsonFt cropElemAtInt;\
+ cropElemAtInt32SmallJsonFt cropElemAtInt32;\
+ cropElemAtUintSmallJsonFt cropElemAtUint;\
+ cropElemAtUint32SmallJsonFt cropElemAtUint32;\
+ cropElemAtSSmallJsonFt cropElemAtS;\
+ cropElemAtCharSmallJsonFt cropElemAtChar;\
+ cropElemAtDictSmallJsonFt cropElemAtDict;\
+ cropElemAtArraySmallJsonFt cropElemAtArray;\
+ cropElemAtSmallBoolSmallJsonFt cropElemAtSmallBool;\
+ cropElemAtSmallBytesSmallJsonFt cropElemAtSmallBytes;\
+ cropElemAtSmallDoubleSmallJsonFt cropElemAtSmallDouble;\
+ cropElemAtSmallIntSmallJsonFt cropElemAtSmallInt;\
+ cropElemAtSmallJsonSmallJsonFt cropElemAtSmallJson;\
+ cropElemAtSmallStringSmallJsonFt cropElemAtSmallString;\
+ cropElemAtVoidSmallJsonFt cropElemAtVoid;\
+ cropElemAtSmallContainerSmallJsonFt cropElemAtSmallContainer;\
+ cropElemKeySmallJsonFt cropElemKey;\
+ cropElemKeyUndefinedSmallJsonFt cropElemKeyUndefined;\
+ cropElemKeyBoolSmallJsonFt cropElemKeyBool;\
+ cropElemKeyDoubleSmallJsonFt cropElemKeyDouble;\
+ cropElemKeyIntSmallJsonFt cropElemKeyInt;\
+ cropElemKeyInt32SmallJsonFt cropElemKeyInt32;\
+ cropElemKeyUintSmallJsonFt cropElemKeyUint;\
+ cropElemKeyUint32SmallJsonFt cropElemKeyUint32;\
+ cropElemKeySSmallJsonFt cropElemKeyS;\
+ cropElemKeyDictSmallJsonFt cropElemKeyDict;\
+ cropElemKeyArraySmallJsonFt cropElemKeyArray;\
+ cropElemKeySmallBoolSmallJsonFt cropElemKeySmallBool;\
+ cropElemKeySmallBytesSmallJsonFt cropElemKeySmallBytes;\
+ cropElemKeySmallDoubleSmallJsonFt cropElemKeySmallDouble;\
+ cropElemKeySmallIntSmallJsonFt cropElemKeySmallInt;\
+ cropElemKeySmallJsonSmallJsonFt cropElemKeySmallJson;\
+ cropElemKeySmallStringSmallJsonFt cropElemKeySmallString;\
+ cropElemKeyVoidSmallJsonFt cropElemKeyVoid;\
+ cropElemKeySmallContainerSmallJsonFt cropElemKeySmallContainer;\
copySmallJsonFt copy;\
insertSmallJsonFt insert;\
insertNSmashSmallJsonFt insertNSmash;\
@@ -3251,6 +3384,12 @@ struct smallJson {
int iProp;
sArrayt *parseP;
int istack;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
sArrayt *stack;
void **propertyOrValue;
ssize_t iterIndex;
@@ -3665,6 +3804,48 @@ smallJsont* shiftSmallJsonNSmashSmallJsonG(smallJsont *self, smallJsont *array);
smallJsont* addSmallJsonG (smallJsont *self, smallArrayt *array);
smallJsont* addJsonSmallJsonG(smallJsont *self, smallJsont *array);
smallJsont* sliceSmallJsonG(smallJsont *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+char* cropSSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
+char cropElemAtCharSmallJsonG (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key);
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key);
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key);
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key);
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key);
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key);
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key);
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key);
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key);
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key);
smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
smallJsont* insertSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
smallJsont* insertNSmashSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
diff --git a/release/json/libsheepyCSmallString.h b/release/json/libsheepyCSmallString.h
@@ -571,6 +571,44 @@ typedef smallStringt* (*setAtSmallStringFt) (smallStringt *self, intmax
typedef smallStringt* (*sliceSmallStringFt) (smallStringt *self, intmax_t start, intmax_t end);
/**
+ * Crop characters from start to end
+ * return a new string with characters from start and end
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * start index, must be in the string
+ * \param
+ * end index, must be in the string
+ * \return
+ * new sliced string (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when string is empty
+ * unchanged when string is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallStringt* (*cropSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+typedef char* (*cropSSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+typedef smallJsont* (*cropSmallJsonSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single character
+ * return character at index
+ * and delete character at index in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the string
+ * \return
+ * character at index
+ * unchanged when list is empty
+ * 0 error
+ */
+typedef char (*cropElemSmallStringFt)(smallStringt *self, intmax_t index);
+
+
+/**
* copy string between start and end
* self becomes the smallString between start and end
* negative indexes are allowed
@@ -1105,6 +1143,10 @@ typedef int (*appendFileSmallStringSmallStringFt)(smallStringt *self, smallStrin
getAtSmallStringFt getAt;\
setAtSmallStringFt setAt;\
sliceSmallStringFt slice;\
+ cropSmallStringFt crop;\
+ cropSSmallStringFt cropS;\
+ cropSmallJsonSmallStringFt cropSmallJson;\
+ cropElemSmallStringFt cropElem;\
copySmallStringFt copy;\
insertSmallStringFt insert;\
insertSmallJsonSmallStringFt insertSmallJson;\
@@ -1381,6 +1423,10 @@ smallStringt* rTrimSmallStringG (smallStringt *self);
smallStringt* uniqSmallStringG (smallStringt *self, char c);
smallStringt* icUniqSmallStringG (smallStringt *self, char c);
smallStringt* sliceSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+char* cropSSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonSmallStringG(smallStringt *self, intmax_t start, intmax_t end);
+char cropElemSmallStringG (smallStringt *self, intmax_t index);
smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end);
smallStringt* insertSmallStringG (smallStringt *self, intmax_t index, smallStringt *toInsert);
smallStringt* insertSmallJsonSmallStringG (smallStringt *self, intmax_t index, smallJsont *toInsert);
diff --git a/release/libsheepy.c b/release/libsheepy.c
@@ -89,6 +89,9 @@ int getLogMode(void);
void setLogMode(int mode);
bool getLogShortPath(void);
void setLogShortPath(bool shortPath);
+bool getLogStdout(void);
+void setLogStdout(bool state);
+bool openProgLogFile(void);
void _pLog(int loglevel, const char *file, const char *func, int line, const char *msg, ...);
#if (!(__APPLE__ || __FreeBSD__ || __TERMUX__ || __OpenBSD__ || __DragonFly__ || MUSL_LIBC || __sun__ || __HAIKU__))
int print_k(FILE *stream, const struct printf_info *info, const void *const *args);
@@ -418,6 +421,10 @@ char *sliceS(const char *string, intmax_t start, intmax_t end);
char *iSliceS(char **string, intmax_t start, intmax_t end);
char *bSliceS(char *string, intmax_t start, intmax_t end);
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end);
+char *cropS(char *string, intmax_t start, intmax_t end);
+char *iCropS(char **string, intmax_t start, intmax_t end);
+char cropElemS(char *string, intmax_t index);
+char iCropElemS(char **string, intmax_t index);
char *insertS(const char *string, intmax_t index, const char *toInsert);
char *insertNFreeS(const char *string, intmax_t index, char *toInsert);
char *iInsertS(char **string, intmax_t index, const char *toInsert);
@@ -631,7 +638,9 @@ char **listAddS(char **list1, char **list2);
char **listSliceS(char **list, intmax_t start, intmax_t end);
char **iListCopyS(char **list, intmax_t start, intmax_t end);
char **iListSliceS(char ***list, intmax_t start, intmax_t end);
+char **listCropS(char **list, intmax_t start, intmax_t end);
char **iListCropS(char ***list, intmax_t start, intmax_t end);
+char *listCropElemS(char **list, intmax_t index);
char *iListCropElemS(char ***list, intmax_t index);
char **listInsertS(char **list, intmax_t index, char **toInsert);
char **iListInsertS(char ***list, intmax_t index, char **toInsert);
@@ -874,6 +883,8 @@ static int _log_current_mode = LOG_DATE;
static bool _log_verbose_short_path = true;
+static bool _logToStdout = true;
+
// logging file 0 is stdout
static uint16_t _current_log_file = 1;
@@ -1031,6 +1042,48 @@ void setLogShortPath(bool shortPath) {
}
/**
+ * get stdout state, when TRUE (default) all logs are printed to stdout
+ */
+bool getLogStdout(void) {
+
+ return(_logToStdout);
+}
+
+/**
+ * enable/disable printing logs to stdout
+ *
+ * TRUE: print logs to stdout
+ * FALSE: print logs to files only
+ */
+void setLogStdout(bool state) {
+
+ _logToStdout = state;
+}
+
+/**
+ * log to a file named progName.log
+ */
+bool openProgLogFile(void) {
+
+ if (!progName) {
+ logME(libsheepyErrorMask, "Program name is not set, call initLibsheepy or set prog name with setProgName");
+ return(false);
+ }
+
+ char *s = formatS("%s.log", progName);;
+
+ if (!setLogFile(s)) {
+ logME(libsheepyErrorMask, "Couldn't open log file: %s", s);
+ free(s);
+ return(false);
+ }
+
+ free(s);
+ return(true);
+}
+
+
+/**
* print logging levels
* logs messages to all log file
*
@@ -1046,6 +1099,11 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
va_list args;
char buffer[lenS(msg) + MAX_MSG_LEN];
+ if (_current_log_file == 1 && !_logToStdout) {
+ // log to stdout is disable and there are no log files
+ return;
+ }
+
if (loglevel > logMaxLevel) {
// skip log above logMaxLevel
return;
@@ -1142,8 +1200,9 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
}
// print the log tag
+ int firstLogFile = _logToStdout ? 0 : 1;
int i;
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s", log_tags[tagSymbols][loglevel]);
}
@@ -1154,27 +1213,27 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
switch(_log_current_mode) {
case LOG_VERBOSE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s() (%s:%d) at %s |\t", func, file, line, clock);
}
break;
case LOG_FUNC:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s %d: ", func, line);
}
break;
case LOG_PROG:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s: ", progName);
}
break;
case LOG_PROGNDATE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s %s: ", progName, clock);
}
break;
case LOG_DATE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s ", clock);
}
break;
@@ -1184,20 +1243,20 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
// print the first line
if (buffer[0] == 0) {
// empty or NULL msg, print empty line
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "\n");
}
}
else {
char *toLog = strtok(buffer, "\n");
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s\n", toLog);
}
// for these next lines, add a pipe and tab once.
toLog = strtok(NULL, "\n");
while (toLog) {
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s\n", toLog);
}
toLog = strtok(NULL, "\n");
@@ -1622,7 +1681,7 @@ int systemNFreeF(char *command, int line, const char *thisFunc, const char *this
r = system(command);
if (r) {
- logE("\nSystem Error at %d, %s, %s. The command was: \"%s\"\n", line, thisFunc, thisFileName, command);
+ logME(libsheepyErrorMask, "\nSystem Error at %d, %s, %s. The command was: \"%s\"\n", line, thisFunc, thisFileName, command);
}
free(command);
return(r);
@@ -2134,7 +2193,7 @@ char *expandHome(const char* path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2324,7 +2383,7 @@ char *iExpandHome(char **path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2508,7 +2567,7 @@ char *bExpandHome(char *path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2685,7 +2744,7 @@ char *bLExpandHome(char *path, size_t pathSize) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -6776,7 +6835,8 @@ char *bLFormatS(char *string, size_t stringSize, const char *fmt, ...) {
* string2 string to append at the end of string1
* \return
* new string string1+string2 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string1 when string2 is NULL (you must free the pointer)
+ * NULL when string1 is NULL
*/
char *appendS(const char *string1, const char *string2) {
char *r = NULL;
@@ -6894,17 +6954,20 @@ char *appendSChar(char c, const char *string2) {
* string2 string to append at the end of string1
* \return
* string1 modified string1 (realloc), string1+string2 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 no change when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iAppendS(char **string1, const char *string2) {
char *tmp = NULL;
size_t l1;
size_t l2;
- if (!string1 || !string2) {
+ if (!string1) {
return(NULL);
}
-
+ if (!string2) {
+ return(*string1);
+ }
if (!*string1) {
*string1 = strdup(string2);
return(*string1);
@@ -7117,7 +7180,8 @@ char *bLAppendManySF(char *string, size_t stringSize, const char *paramType, ...
* string2 string to prepend at the beginning of string1
* \return
* new string string2+string1 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string2 when string1 is NULL (you must free the pointer)
+ * NULL when string2 is NULL
*/
char *prependS(const char *string1, const char *string2) {
@@ -7161,16 +7225,19 @@ char *prependSChar(char c, const char *string2) {
* string1 string, which is reallocated.
* string2 string to prepend at the beginning of string1
* \return
- * string1 modified string1, string2+string1 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 modified string1, string2+string1 (you must free the pointer)
+ * string1 when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iPrependS(char **string1, const char *string2) {
size_t l2;
- if (!string1 || !string2) {
+ if (!string1) {
return(NULL);
}
-
+ if (!string2) {
+ return(*string1);
+ }
if (!*string1) {
*string1 = strdup(string2);
return(*string1);
@@ -12724,6 +12791,179 @@ char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end) {
}
/**
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *cropS(char *string, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!string) {
+ return(NULL);
+ }
+
+ len = strlen(string);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ strLCpy(l, (n+1) * sizeof(char), string+start);
+ strLCpy(string+start, len-end+1, string+end);
+ }
+
+ return(l);
+}
+
+/**
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *iCropS(char **string, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!string || !*string) {
+ return(NULL);
+ }
+
+ len = strlen(*string);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ strLCpy(l, (n+1) * sizeof(char), *string+start);
+ strLCpy(*string+start, len-end+1, *string+end);
+ }
+
+ return(l);
+}
+
+char cropElemS(char *string, intmax_t index) {
+ intmax_t len;
+
+ if (!string) {
+ return(0);
+ }
+
+ len = strlen(string);
+ if (index >= len) {
+ return(0);
+ }
+ if (index < -len) {
+ return(0);
+ }
+ if (index < 0) {
+ index = len + index;
+ }
+
+ char r = *(string+index);
+
+ if (index == len-1) {
+ string[len-1] = 0;
+ }
+ else {
+ strLCpy(string+index, len-1, string+index+1);
+ }
+
+ return(r);
+}
+
+char iCropElemS(char **string, intmax_t index) {
+
+ if (!string) {
+ return(0);
+ }
+
+ return(cropElemS(*string, index));
+}
+
+/**
* insert string in string at index
*
* return new string with toInsert at index
@@ -12746,7 +12986,10 @@ char *insertS(const char *string, intmax_t index, const char *toInsert) {
// sanity checks
if (!string) {
- return(NULL);
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(strdup(toInsert));
}
if (!toInsert || isEmptyS(toInsert)) {
return(strdup(string));
@@ -12790,7 +13033,7 @@ char *insertS(const char *string, intmax_t index, const char *toInsert) {
}
/**
- * insert string in string at index and free toInsert
+ * insert string in string at index and free toInsert when successful
*
* return new string with toInsert at index
* negative indexes are allowed
@@ -12812,12 +13055,15 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
// sanity checks
if (!string) {
+ if (index) {
+ return(NULL);
+ }
+ if (!toInsert) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- free(toInsert);
- return(strdup(string));
+ return(r);
}
len = strlen(string);
@@ -12831,14 +13077,12 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -12846,6 +13090,11 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, string);
@@ -12883,11 +13132,16 @@ char *iInsertS(char **string, intmax_t index, const char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
+ *string = r;
+ return(r);
}
len = strlen(*string);
@@ -12915,6 +13169,10 @@ char *iInsertS(char **string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -12953,13 +13211,17 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
- free(toInsert);
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
+ *string = r;
+ return(r);
}
len = strlen(*string);
@@ -12974,14 +13236,12 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -12989,6 +13249,11 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -13030,10 +13295,6 @@ char *bInsertS(char *string, intmax_t index, const char *toInsert) {
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
-
len = strlen(string);
if (!len && index == -1) {
@@ -13059,6 +13320,10 @@ char *bInsertS(char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -13099,9 +13364,6 @@ char *bLInsertS(char *string, size_t stringSize, intmax_t index, const char *toI
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
if (!stringSize) {
// string size is 0 - no change
@@ -13133,6 +13395,10 @@ char *bLInsertS(char *string, size_t stringSize, intmax_t index, const char *toI
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -13172,7 +13438,11 @@ char *injectS(const char *string, intmax_t index, char toInject) {
// sanity checks
if (!string) {
- return(NULL);
+ if (index) {
+ return(NULL);
+ }
+ charToS(inject, toInject);
+ return(strdup(inject));
}
len = strlen(string);
@@ -13237,9 +13507,17 @@ char *iInjectS(char **string, intmax_t index, char toInject) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ charToS(inject, toInject);
+ *string = strdup(inject);
+ return(*string);
+ }
len = strlen(*string);
@@ -46906,10 +47184,10 @@ char *insertUTF8(const char *string, intmax_t index, const char *toInsert) {
// sanity checks
if (!string) {
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- return(strdup(string));
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(strdup(toInsert));
}
len = lenUTF8(string);
@@ -46937,6 +47215,10 @@ char *insertUTF8(const char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
return(catS(toInsert, string));
@@ -46975,12 +47257,15 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
// sanity checks
if (!string) {
+ if (index) {
+ return(NULL);
+ }
+ if (!toInsert) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- free(toInsert);
- return(strdup(string));
+ return(r);
}
len = lenUTF8(string);
@@ -46995,14 +47280,12 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -47010,6 +47293,11 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, string);
@@ -47024,8 +47312,6 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
freeManyS(s1,s2, toInsert);
return(r);
-
- return(NULL);
}
@@ -47051,11 +47337,16 @@ char *iInsertUTF8(char **string, intmax_t index, const char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
+ *string = r;
+ return(r);
}
len = lenUTF8(*string);
@@ -47083,6 +47374,10 @@ char *iInsertUTF8(char **string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -47123,13 +47418,17 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
- free(toInsert);
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
+ *string = r;
+ return(r);
}
len = lenUTF8(*string);
@@ -47144,14 +47443,12 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -47159,6 +47456,11 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -47175,8 +47477,6 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
free(*string);
*string = r;
return(r);
-
- return(NULL);
}
@@ -47204,9 +47504,6 @@ char *bInsertUTF8(char *string, intmax_t index, const char *toInsert) {
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
len = lenUTF8(string);
@@ -47233,6 +47530,10 @@ char *bInsertUTF8(char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -47275,9 +47576,6 @@ char *bLInsertUTF8(char *string, size_t stringSize, intmax_t index, const char *
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
if (!stringSize) {
// string size is 0 - no change
@@ -47309,6 +47607,10 @@ char *bLInsertUTF8(char *string, size_t stringSize, intmax_t index, const char *
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -48356,18 +48658,13 @@ char **listFromArrayS(char **array, size_t size) {
char **listPushS(char ***list, const char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = strdup(s);
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = strdup(s);
(*list)[1] = NULL;
}
else {
@@ -48381,15 +48678,9 @@ char **listPushS(char ***list, const char *s) {
else {
*list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = strdup(s);
+ (*list)[len] = strdup(s);
}
}
- }
return(*list);
}
@@ -48419,18 +48710,13 @@ char **listPushCharS(char ***list, char c) {
char **iListPushS(char ***list, char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
@@ -48444,15 +48730,9 @@ char **iListPushS(char ***list, char *s) {
else {
*list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = s;
+ (*list)[len] = s;
}
}
- }
return(*list);
}
@@ -48509,27 +48789,17 @@ char *listPopS(char ***list) {
char **listPrependS(char ***list, const char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = strdup(s);
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = strdup(s);
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
- // realloc list and copy s to last element
+ // realloc list and copy s to first element
uint64_t len;
len = listLengthS(*list);
char **tmp = REALLOC(*list, (len+2) * sizeof(char *));
@@ -48575,27 +48845,17 @@ char **listPrependCharS(char ***list, char c) {
char **iListPrependS(char ***list, char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
- // realloc list and copy s to last element
+ // realloc list and copy s to first element
uint64_t len;
len = listLengthS(*list);
char **tmp = REALLOC(*list, (len+2) * sizeof(char *));
@@ -50218,7 +50478,84 @@ char **iListSliceS(char ***list, intmax_t start, intmax_t end) {
* string pointers are copied to the sliced list
*
* \param
- * list (this parameter is reallocated)
+ * list
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free the pointer with listFreeS or free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char **listCropS(char **list, intmax_t start, intmax_t end) {
+ char **l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!list) {
+ return(NULL);
+ }
+
+ len = listLengthS(list);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char *));
+ if (!l) {
+ return(NULL);
+ }
+ for (intmax_t i=0;i < n;i++) {
+ l[i] = *(list+start+i);
+ }
+ l[n] = NULL;
+ // free end < len
+ for (intmax_t i=0;i < (len - end);i++) {
+ list[i+start] = *(list+i+end);
+ }
+ list[len-n] = NULL;
+ }
+
+ return(l);
+}
+
+/**
+ * list Crop String
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelS because only the
+ * string pointers are copied to the sliced list
+ *
+ * \param
+ * list
* \param
* start index, must be in the list
* \param
@@ -50232,7 +50569,6 @@ char **iListSliceS(char ***list, intmax_t start, intmax_t end) {
*/
char **iListCropS(char ***list, intmax_t start, intmax_t end) {
char **l = NULL;
- char **input = NULL;
intmax_t len;
// sanity checks
@@ -50243,8 +50579,6 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
len = listLengthS(*list);
if (start > len) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
if (end > len) {
@@ -50254,8 +50588,6 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
start = -len;
}
if (end <= -len) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
if (start < 0) {
@@ -50265,18 +50597,10 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
end = len + end;
}
if (end < start) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
- if (start == end) {
- // empty list
- listEmptyS(l);
- // free elements
- listFreeS(*list);
- }
- else {
+ if (start < end) {
// start < end < len
intmax_t n;
n = end - start;
@@ -50284,27 +50608,17 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
if (!l) {
return(NULL);
}
- input = MALLOC((len-n+1) * sizeof(char *));
- if (!input) {
- return(NULL);
- }
for (intmax_t i=0;i < n;i++) {
l[i] = *((*list)+start+i);
}
l[n] = NULL;
- // free 0 < start
- for (intmax_t i=0;i < start;i++) {
- input[i] = *((*list)+i);
- }
// free end < len
for (intmax_t i=0;i < (len - end);i++) {
- input[i+start] = *((*list)+i+end);
+ (*list)[i+start] = *((*list)+i+end);
}
- input[len-n] = NULL;
- free(*list);
+ (*list)[len-n] = NULL;
}
- *list = input;
return(l);
}
@@ -50318,7 +50632,7 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
* string pointer is returned directly
*
* \param
- * list (this parameter is reallocated)
+ * list
* \param
* index must be in the list
* \return
@@ -50328,17 +50642,16 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
* unchanged when list is NULL or when start and end are not set correctly
* NULL error
*/
-char *iListCropElemS(char ***list, intmax_t index) {
- char **l = NULL;
+char *listCropElemS(char **list, intmax_t index) {
char *r = NULL;
intmax_t len;
// sanity checks
- if (!list || !*list) {
+ if (!list) {
return(NULL);
}
- len = listLengthS(*list);
+ len = listLengthS(list);
if (len == 0) {
return(NULL);
@@ -50354,21 +50667,66 @@ char *iListCropElemS(char ***list, intmax_t index) {
index = len + index;
}
- l = MALLOC((len-1+1) * sizeof(char *));
- if (!l) {
+ r = *(list+index);
+ for (intmax_t i=index ; i < len-1 ; i++) {
+ list[i] = *(list+1+i);
+ }
+ list[len-1] = NULL;
+
+ return(r);
+}
+
+/**
+ * list Crop Element String
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelElemS because only the
+ * string pointer is returned directly
+ *
+ * \param
+ * list
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *iListCropElemS(char ***list, intmax_t index) {
+ char *r = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!list || !*list) {
return(NULL);
}
- for (intmax_t i=0;i < index;i++) {
- l[i] = *((*list)+i);
+
+ len = listLengthS(*list);
+
+ if (len == 0) {
+ return(NULL);
+ }
+
+ if (index >= len) {
+ return(NULL);
+ }
+ if (index < -len) {
+ return(NULL);
}
+ if (index < 0) {
+ index = len + index;
+ }
+
r = *((*list)+index);
for (intmax_t i=index ; i < len-1 ; i++) {
- l[i] = *((*list)+1+i);
+ (*list)[i] = *((*list)+1+i);
}
- l[len-1] = NULL;
+ (*list)[len-1] = NULL;
- free(*list);
- *list = l;
return(r);
}
@@ -50397,12 +50755,11 @@ char **listInsertS(char **list, intmax_t index, char **toInsert) {
//sanity checks
if (!list) {
- return(NULL);
- }
- if (!toInsert || listIsEmptyS(toInsert)) {
- return(listDupS(list));
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(listDupS(toInsert));
}
-
len = listLengthS(list);
if (!len && index == -1) {
@@ -50428,6 +50785,10 @@ char **listInsertS(char **list, intmax_t index, char **toInsert) {
}
+ if (!toInsert || listIsEmptyS(toInsert)) {
+ return(listDupS(list));
+ }
+
if (index == 0) {
// insert at beginning
return(listAddS(toInsert, list));
@@ -50467,11 +50828,16 @@ char **iListInsertS(char ***list, intmax_t index, char **toInsert) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (!toInsert || listIsEmptyS(toInsert)) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDupS(toInsert);
+ *list = r;
+ return(r);
}
len = listLengthS(*list);
@@ -50499,6 +50865,10 @@ char **iListInsertS(char ***list, intmax_t index, char **toInsert) {
}
+ if (listIsEmptyS(toInsert)) {
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
iListAppendS(&r, toInsert);
@@ -50543,16 +50913,17 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
intmax_t len;
//sanity checks
- if (!toInsert) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (listIsEmptyS(toInsert)) {
- listFreeS(toInsert);
- return(NULL);
- }
- if (!list || !*list) {
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDupS(toInsert);
listFreeS(toInsert);
- return(NULL);
+ *list = r;
+ return(r);
}
len = listLengthS(*list);
@@ -50567,14 +50938,12 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
}
if (index > len) {
- listFreeS(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- listFreeS(toInsert);
return(NULL);
}
if (neg) {
@@ -50582,6 +50951,11 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
}
+ if (listIsEmptyS(toInsert)) {
+ listFreeS(toInsert);
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
iListAppendS(&r, toInsert);
@@ -50627,10 +51001,15 @@ char **listInjectS(char **list, intmax_t index, char *toInject) {
//sanity checks
if (!list) {
- return(NULL);
+ if (index || !toInject) {
+ return(NULL);
+ }
+ listPushS(&r, toInject);
+ return(r);
}
+
if (!toInject) {
- return(listDupS(list));
+ return(NULL);
}
len = listLengthS(list);
@@ -50706,11 +51085,15 @@ char **iListInjectS(char ***list, intmax_t index, char *toInject) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInject) {
return(NULL);
}
- if (!toInject) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ listPushS(list, toInject);
+ return(*list);
}
len = listLengthS(*list);
@@ -51828,9 +52211,15 @@ char **listUniqS(char **list) {
return(NULL);
}
+ size_t len = listLengthS(list);
+
+ if (!len) {
+ listEmptyS(r);
+ return(r);
+ }
listPushS(&r, list[0]);
// one element list
- if (listLengthS(list) == 1) {
+ if (len == 1) {
return(r);
}
// push element to new list if it is not already in new list
@@ -51862,7 +52251,12 @@ char **iListUniqS(char ***list) {
return(NULL);
}
- if (listLengthS(*list) < 2) {
+ size_t len = listLengthS(*list);
+
+ if (!len) {
+ listEmptyS(r);
+ }
+ else if (len == 1) {
// one element list
iListPushS(&r, (*list)[0]);
}
@@ -52521,18 +52915,13 @@ void **listFromArray(void **array, size_t size) {
void **listPush(void ***list, void *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(void *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(void *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
@@ -52544,17 +52933,11 @@ void **listPush(void ***list, void *s) {
return(NULL);
}
else {
- *list = tmp;
+ *list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = s;
+ (*list)[len] = s;
}
}
- }
return(*list);
}
@@ -52613,26 +52996,16 @@ void *listPop(void ***list) {
void **listPrepend(void ***list, void *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(void *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(void *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
// realloc list and copy s to last element
uint64_t len;
len = listLength(*list);
@@ -52813,7 +53186,7 @@ void **listSet(void **list, intmax_t index, void *s) {
intmax_t len;
// sanity checks
- if (!list || !s) {
+ if (!list) {
return(NULL);
}
@@ -52828,6 +53201,10 @@ void **listSet(void **list, intmax_t index, void *s) {
index = len + index;
}
+ if (!s) {
+ return(list);
+ }
+
list[index] = s;
return(list);
}
@@ -53264,10 +53641,14 @@ void **listInsert(void **list, intmax_t index, void **toInsert) {
//sanity checks
if (!list) {
- return(NULL);
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(listDup(toInsert));
}
- if (!toInsert || listIsEmpty(toInsert)) {
- return(listDup(list));
+
+ if (!toInsert) {
+ return(NULL);
}
len = listLength(list);
@@ -53295,6 +53676,10 @@ void **listInsert(void **list, intmax_t index, void **toInsert) {
}
+ if (listIsEmpty(toInsert)) {
+ return(listDup(list));
+ }
+
if (index == 0) {
// insert at beginning
return(listAdd(toInsert, list));
@@ -53335,11 +53720,16 @@ void **iListInsert(void ***list, intmax_t index, void **toInsert) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (!toInsert || listIsEmpty(toInsert)) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDup(toInsert);
+ *list = r;
+ return(r);
}
len = listLength(*list);
@@ -53367,6 +53757,10 @@ void **iListInsert(void ***list, intmax_t index, void **toInsert) {
}
+ if (listIsEmpty(toInsert)) {
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
listAppend(&r, toInsert);
diff --git a/release/libsheepy.h b/release/libsheepy.h
@@ -88,15 +88,15 @@
*
* Error from any function returning a status have 0, false or NULL for value
* (or specifed otherwise in the function description).
+ * Errors are reported when the parameters are NULL or invalid, when it happens no parameters and no data stuctures are freed or changed.
* Errors are detected with if (!func)
*
* For more information, the documentation is located at http://spartatek.se/libsheepy/
*/
-
// version accoring to the version package: Release.Major.minor.patch
// https://noulin.net/version/file/README.md.html
-#define LIBSHEEPY_VERSION "1.0.9.1"
+#define LIBSHEEPY_VERSION "1.1.0"
#ifndef SH_PREFIX
#define SH_PREFIX(NAME) NAME
@@ -921,6 +921,15 @@ bool getLogShortPath(void);
// set log long/short file path value for VERBOSE mode
void setLogShortPath(bool shortPath);
+// get stdout state, when TRUE (default) all logs are printed to stdout
+bool getLogStdout(void);
+
+// enable/disable printing logs to stdout
+void setLogStdout(bool state);
+
+// log to a file named progName.log
+bool openProgLogFile(void);
+
/**
* print logging levels
*
@@ -1961,6 +1970,12 @@ char *iSliceS(char **string, intmax_t start, intmax_t end);
char *bSliceS(char *string, intmax_t start, intmax_t end);
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end);
+// crop string (slice+del)
+char *cropS(char *string, intmax_t start, intmax_t end);
+char *iCropS(char **string, intmax_t start, intmax_t end);
+char cropElemS(char *string, intmax_t index);
+char iCropElemS(char **string, intmax_t index);
+
// insert string in string
char *insertS(const char *string, intmax_t index, const char *toInsert);
char *insertNFreeS(const char *string, intmax_t index, char *toInsert);
@@ -2423,7 +2438,9 @@ char **iListCopyS(char **list, intmax_t start, intmax_t end);
char **iListSliceS(char ***list, intmax_t start, intmax_t end);
// crop list (slice+del)
+char **listCropS(char **list, intmax_t start, intmax_t end);
char **iListCropS(char ***list, intmax_t start, intmax_t end);
+char *listCropElemS(char **list, intmax_t index);
char *iListCropElemS(char ***list, intmax_t index);
// insert list in list
@@ -2741,14 +2758,14 @@ bool appendText(const char *filePath, char **list);
// execOut
char **execOut(const char *cmd);
// convenience define
-#define systemOut execOut
+#define execOutf systemOutf
+#define execf systemf
// system command with formatting
char **systemOutf(const char *fmt, ...);
// convenience define
-#define execOutf systemOutf
+#define systemOut execOut
int systemf(const char *fmt, ...);
-#define execf systemf
// system commands and log
#define logSystem(cmd) do{\
@@ -2780,6 +2797,7 @@ int commandfF(int line, const char *thisFunc, const char *thisFileName, const ch
#define commandNFree(cmd) commandNFreeF(cmd, __LINE__, __func__, __FILE__)
int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFileName);
#define commandOut execOut
+#define commandOutf systemOutf
// log then run command and return exit code from command (not system return value like system, systemf and systemNFree)
#define logCommand(cmd) funcbegin\
@@ -2800,6 +2818,7 @@ int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFil
funcend
#define logCommandOut logExecOut
+#define logCommandOutf logExecOutf
// compare lists
bool listEqS(char **list1, char **list2);
@@ -7212,7 +7231,7 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
*
* typeName bits;
*
- * staticBitsetClear(&bits);
+ * staticBitsetInit(&bits);
*
* staticBitset1(&bits, index);
*
@@ -7233,6 +7252,8 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
#define staticBitsetT(typeName, containerType, count)\
typedef struct {containerType map[BUCKETS(count, 8 * sizeof(containerType))];} typeName;
+#define staticBitsetInit staticBitsetClear
+
/** bitset count */
#define staticBitsetCount(name) (sizeof((name)->map) * 8)
diff --git a/release/libsheepyObject.h b/release/libsheepyObject.h
@@ -163,7 +163,12 @@ static const bool checkObjectTypes = true;
/**
* free buffers in obj
*/
-#define freeO(obj) (obj)->f->free(obj)
+#define freeO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->free(p);\
+ })
+
#define freeG(self) _Generic((self), \
smallArrayt*: freeSmallArrayG, \
smallBoolt*: freeSmallBoolG, \
@@ -189,7 +194,11 @@ void freeManyOF(void *paramType, ...);
/**
* free buffers and obj itself
*/
-#define terminateO(obj) if (obj) {(obj)->f->terminate(&(obj));}
+#define terminateO(obj) MACRO (\
+ var p = obj;\
+ if (p) {\
+ p->f->terminate(&(obj));\
+ })
#define terminateG terminateO
/**
@@ -288,7 +297,11 @@ void terminateManyOF(void *paramType, ...);
/**
* free object and keep data
*/
-#define smashO(obj) (obj)->f->smash(&obj)
+#define smashO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->smash(&obj);\
+ })
#define smashG smashO
/**
@@ -300,7 +313,11 @@ void smashManyOF(void *paramType, ...);
/**
* free container only
*/
-#define finishO(obj) if (obj) {(obj)->f->finish(&(obj));}
+#define finishO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->finish(&(obj));\
+ })
#define finishG finishO
/**
@@ -408,7 +425,7 @@ void finishManyOF(void *paramType, ...);
#define setTopO(self, value) (self)->f->setTop(self, value)
-#define setFromO (self)->f->set(self, value)
+#define setFromO(self, value) (self)->f->set(self, value)
#define setFromG setTopG
#define setTopG(self, value) _Generic((self), \
smallArrayt*: _Generic(value, \
@@ -3237,12 +3254,14 @@ void finishManyOF(void *paramType, ...);
const char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
), \
char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
) \
)(self, path)
@@ -3285,16 +3304,44 @@ void finishManyOF(void *paramType, ...);
const char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
), \
char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
) \
)(self, path)
-//TODO #define appendFileG(self, path) _Generic((self),
+#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
+#define appendFileG(self, path) _Generic((self), \
+ smallArrayt *: _Generic(path, \
+ char *: appendTextSmallArrayG, \
+ const char *: appendTextSmallArrayG, \
+ smallStringt *: appendTextSmallStringSmallArrayG, \
+ default: appendTextSmallArrayG), \
+ smallBytest *: _Generic(path, \
+ char *: appendFileSmallBytesG, \
+ const char *: appendFileSmallBytesG, \
+ smallStringt *: appendFileSmallStringSmallBytesG, \
+ default: appendFileSmallBytesG), \
+ smallDictt *: _Generic(path, \
+ char *: appendFileSmallDictG, \
+ const char *: appendFileSmallDictG, \
+ smallStringt *: appendFileSmallStringSmallDictG, \
+ default: appendFileSmallDictG), \
+ smallJsont *: _Generic(path, \
+ char *: appendFileSmallJsonG, \
+ const char *: appendFileSmallJsonG, \
+ smallStringt *: appendFileSmallStringSmallJsonG, \
+ smallJsont *: appendFileJsonSmallJsonG), \
+ char *: appendFileSG, \
+ const char *: appendFileSG, \
+ char **: appendTextSG, \
+ const char **: appendTextCG \
+ )(self, path)
//TODO typeStringSmallArray rtChar rtSmallStringt
//TODO typeStringsSmallArray
@@ -4980,6 +5027,311 @@ void finishManyOF(void *paramType, ...);
smallStringt *: sliceSmallStringG \
)(self, start, end)
+
+#define cropO(self, start, end) (self)->f->crop(self, start, end)
+#define cropG(self, start, end) _Generic((self), \
+ char *: cropS, \
+ char **: listCropS, \
+ char ***: iListCropS, \
+ smallArrayt *: cropSmallArrayG, \
+ smallJsont *: cropSmallJsonG, \
+ smallStringt *: cropSmallStringG \
+ )(self, start, end)
+
+#define cropElemO(self, index) (self)->f->cropElem(self, index)
+#define cropElemG(self, returnType, index) _Generic((self), \
+ smallDictt*: _Generic(index, \
+ char *: _Generic(returnType, \
+ baset*: cropElemSmallDictG, \
+ undefinedt*: cropElemUndefinedSmallDictG, \
+ bool: cropElemBoolSmallDictG, \
+ double: cropElemDoubleSmallDictG, \
+ int64_t: cropElemIntSmallDictG, \
+ int32_t: cropElemInt32SmallDictG, \
+ uint64_t: cropElemUintSmallDictG, \
+ uint32_t: cropElemUint32SmallDictG, \
+ char*: cropElemSSmallDictG, \
+ smallDictt*: cropElemDictSmallDictG, \
+ smallArrayt*: cropElemArraySmallDictG, \
+ smallBoolt*: cropElemSmallBoolSmallDictG, \
+ smallBytest*: cropElemSmallBytesSmallDictG, \
+ smallDoublet*: cropElemSmallDoubleSmallDictG, \
+ smallIntt*: cropElemSmallIntSmallDictG, \
+ smallJsont*: cropElemSmallJsonSmallDictG, \
+ smallStringt*: cropElemSmallStringSmallDictG, \
+ void*: cropElemVoidSmallDictG, \
+ smallContainert*: cropElemSmallContainerSmallDictG, \
+ default: cropElemSmallDictG), \
+ const char *: _Generic(returnType, \
+ baset*: cropElemSmallDictG, \
+ undefinedt*: cropElemUndefinedSmallDictG, \
+ bool: cropElemBoolSmallDictG, \
+ double: cropElemDoubleSmallDictG, \
+ int64_t: cropElemIntSmallDictG, \
+ int32_t: cropElemInt32SmallDictG, \
+ uint64_t: cropElemUintSmallDictG, \
+ uint32_t: cropElemUint32SmallDictG, \
+ char*: cropElemSSmallDictG, \
+ smallDictt*: cropElemDictSmallDictG, \
+ smallArrayt*: cropElemArraySmallDictG, \
+ smallBoolt*: cropElemSmallBoolSmallDictG, \
+ smallBytest*: cropElemSmallBytesSmallDictG, \
+ smallDoublet*: cropElemSmallDoubleSmallDictG, \
+ smallIntt*: cropElemSmallIntSmallDictG, \
+ smallJsont*: cropElemSmallJsonSmallDictG, \
+ smallStringt*: cropElemSmallStringSmallDictG, \
+ void*: cropElemVoidSmallDictG, \
+ smallContainert*: cropElemSmallContainerSmallDictG, \
+ default: cropElemSmallDictG), \
+ default: cropElemSmallDictG \
+ ), \
+ smallJsont*: _Generic(index, \
+ char *: _Generic(returnType, \
+ baset*: cropElemKeySmallJsonG, \
+ undefinedt*: cropElemKeyUndefinedSmallJsonG, \
+ bool: cropElemKeyBoolSmallJsonG, \
+ double: cropElemKeyDoubleSmallJsonG, \
+ int64_t: cropElemKeyIntSmallJsonG, \
+ int32_t: cropElemKeyInt32SmallJsonG, \
+ uint64_t: cropElemKeyUintSmallJsonG, \
+ uint32_t: cropElemKeyUint32SmallJsonG, \
+ char*: cropElemKeySSmallJsonG, \
+ smallDictt*: cropElemKeyDictSmallJsonG, \
+ smallArrayt*: cropElemKeyArraySmallJsonG, \
+ smallBoolt*: cropElemKeySmallBoolSmallJsonG, \
+ smallBytest*: cropElemKeySmallBytesSmallJsonG, \
+ smallDoublet*: cropElemKeySmallDoubleSmallJsonG, \
+ smallIntt*: cropElemKeySmallIntSmallJsonG, \
+ smallJsont*: cropElemKeySmallJsonSmallJsonG, \
+ smallStringt*: cropElemKeySmallStringSmallJsonG, \
+ void*: cropElemKeyVoidSmallJsonG, \
+ smallContainert*: cropElemKeySmallContainerSmallJsonG, \
+ default: cropElemKeySmallJsonG), \
+ const char *: _Generic(returnType, \
+ baset*: cropElemKeySmallJsonG, \
+ undefinedt*: cropElemKeyUndefinedSmallJsonG, \
+ bool: cropElemKeyBoolSmallJsonG, \
+ double: cropElemKeyDoubleSmallJsonG, \
+ int64_t: cropElemKeyIntSmallJsonG, \
+ int32_t: cropElemKeyInt32SmallJsonG, \
+ uint64_t: cropElemKeyUintSmallJsonG, \
+ uint32_t: cropElemKeyUint32SmallJsonG, \
+ char*: cropElemKeySSmallJsonG, \
+ smallDictt*: cropElemKeyDictSmallJsonG, \
+ smallArrayt*: cropElemKeyArraySmallJsonG, \
+ smallBoolt*: cropElemKeySmallBoolSmallJsonG, \
+ smallBytest*: cropElemKeySmallBytesSmallJsonG, \
+ smallDoublet*: cropElemKeySmallDoubleSmallJsonG, \
+ smallIntt*: cropElemKeySmallIntSmallJsonG, \
+ smallJsont*: cropElemKeySmallJsonSmallJsonG, \
+ smallStringt*: cropElemKeySmallStringSmallJsonG, \
+ void*: cropElemKeyVoidSmallJsonG, \
+ smallContainert*: cropElemKeySmallContainerSmallJsonG, \
+ default: cropElemKeySmallJsonG), \
+ int64_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int32_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int16_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int8_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint64_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint32_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint16_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint8_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ default: cropElemKeySmallJsonG \
+ ), \
+ smallArrayt*: _Generic(returnType, \
+ baset*: cropElemSmallArrayG, \
+ undefinedt*: cropElemUndefinedSmallArrayG, \
+ bool: cropElemBoolSmallArrayG, \
+ double: cropElemDoubleSmallArrayG, \
+ int64_t: cropElemIntSmallArrayG, \
+ int32_t: cropElemInt32SmallArrayG, \
+ uint64_t: cropElemUintSmallArrayG, \
+ uint32_t: cropElemUint32SmallArrayG, \
+ char*: cropElemSSmallArrayG, \
+ smallDictt*: cropElemDictSmallArrayG, \
+ smallArrayt*: cropElemArraySmallArrayG, \
+ smallBoolt*: cropElemSmallBoolSmallArrayG, \
+ smallBytest*: cropElemSmallBytesSmallArrayG, \
+ smallDoublet*: cropElemSmallDoubleSmallArrayG, \
+ smallIntt*: cropElemSmallIntSmallArrayG, \
+ smallJsont*: cropElemSmallJsonSmallArrayG, \
+ smallStringt*: cropElemSmallStringSmallArrayG, \
+ void*: cropElemVoidSmallArrayG, \
+ smallContainert*: cropElemSmallContainerSmallArrayG, \
+ default: cropElemSmallArrayG), \
+ smallStringt*: cropElemSmallStringG, \
+ char *: cropElemS, \
+ char **: listCropElemS, \
+ char ***: iListCropElemS \
+ )(self, index)
+
+
+#define cropSmallJsonO(self, start, end) (self)->f->cropSmallJson(self, start, end)
+#define cropElemAtSmallJsonO(self, index) (self)->f->cropElemAtSmallJson(self, index)
+#define cropElemKeySmallJsonO(self, key) (self)->f->cropElemKeySmallJson(self, key)
+#define cropSmallStringO(self, start, end) (self)->f->cropSmallString(self, start, end)
+#define cropElemSmallStringO(self, index) (self)->f->cropElemSmallString(self, index)
+
#define copyRngO(self, start, end) (self)->f->copy(self, start, end)
#define copyRngG(self, start, end) _Generic((self), \
char *: sliceS, \
@@ -7030,6 +7382,57 @@ void finishManyOF(void *paramType, ...);
#define appendNSmashArrayO(self, array) (self)->f->appendNSmashArray(self, array)
#define appendNSmashArrayG appendNSmashArrayO
+#define cropElemUndefinedO(self, index) (self)->f->cropElemUndefined(self, index)
+#define cropElemUndefinedG cropElemUndefinedO
+
+#define cropElemBoolO(self, index) (self)->f->cropElemBool(self, index)
+#define cropElemBoolG cropElemBoolO
+
+#define cropElemDoubleO(self, index) (self)->f->cropElemDouble(self, index)
+#define cropElemDoubleG cropElemDoubleO
+
+#define cropElemIntO(self, index) (self)->f->cropElemInt(self, index)
+#define cropElemIntG cropElemIntO
+
+#define cropElemInt32O(self, index) (self)->f->cropElemInt32(self, index)
+#define cropElemInt32G cropElemInt32O
+
+#define cropElemUintO(self, index) (self)->f->cropElemUint(self, index)
+#define cropElemUintG cropElemUintO
+
+#define cropElemUint32O(self, index) (self)->f->cropElemUint32(self, index)
+#define cropElemUint32G cropElemUint32O
+
+#define cropElemSO(self, index) (self)->f->cropElemS(self, index)
+#define cropElemSG cropElemSO
+
+#define cropElemDictO(self, index) (self)->f->cropElemDict(self, index)
+#define cropElemDictG cropElemDictO
+
+#define cropElemArrayO(self, index) (self)->f->cropElemArray(self, index)
+#define cropElemArrayG cropElemArrayO
+
+#define cropElemSmallBoolO(self, index) (self)->f->cropElemSmallBool(self, index)
+#define cropElemSmallBoolG cropElemSmallBoolO
+
+#define cropElemSmallBytesO(self, index) (self)->f->cropElemSmallBytes(self, index)
+#define cropElemSmallBytesG cropElemSmallBytesO
+
+#define cropElemSmallDoubleO(self, index) (self)->f->cropElemSmallDouble(self, index)
+#define cropElemSmallDoubleG cropElemSmallDoubleO
+
+#define cropElemSmallIntO(self, index) (self)->f->cropElemSmallInt(self, index)
+#define cropElemSmallIntG cropElemSmallIntO
+
+#define cropElemSmallJsonO(self, index) (self)->f->cropElemSmallJson(self, index)
+#define cropElemSmallJsonG cropElemSmallJsonO
+
+#define cropElemVoidO(self, index) (self)->f->cropElemVoid(self, index)
+#define cropElemVoidG cropElemVoidO
+
+#define cropElemSmallContainerO(self, index) (self)->f->cropElemSmallContainer(self, index)
+#define cropElemSmallContainerG cropElemSmallContainerO
+
#define injectUndefinedO(self, index) (self)->f->injectUndefined(self, index)
#define injectUndefinedG injectUndefinedO
@@ -7522,9 +7925,6 @@ void finishManyOF(void *paramType, ...);
#define equalSmallStringO(self, p2) (self)->f->equalSmallString(self, p2)
#define equalSmallStringG equalSmallStringO
-#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
-#define appendFileG appendFileO
-
#define appendFileSmallStringO(self, filePath) (self)->f->appendFileSmallString(self, filePath)
#define appendFileSmallStringG appendFileSmallStringO
@@ -8125,6 +8525,120 @@ void finishManyOF(void *paramType, ...);
#define addJsonO(self, array) (self)->f->addJson(self, array)
#define addJsonG addJsonO
+#define cropSO(self, start, end) (self)->f->cropS(self, start, end)
+#define cropSG cropSO
+
+#define cropElemAtO(self, index) (self)->f->cropElemAt(self, index)
+#define cropElemAtG cropElemAtO
+
+#define cropElemAtUndefinedO(self, index) (self)->f->cropElemAtUndefined(self, index)
+#define cropElemAtUndefinedG cropElemAtUndefinedO
+
+#define cropElemAtBoolO(self, index) (self)->f->cropElemAtBool(self, index)
+#define cropElemAtBoolG cropElemAtBoolO
+
+#define cropElemAtDoubleO(self, index) (self)->f->cropElemAtDouble(self, index)
+#define cropElemAtDoubleG cropElemAtDoubleO
+
+#define cropElemAtIntO(self, index) (self)->f->cropElemAtInt(self, index)
+#define cropElemAtIntG cropElemAtIntO
+
+#define cropElemAtInt32O(self, index) (self)->f->cropElemAtInt32(self, index)
+#define cropElemAtInt32G cropElemAtInt32O
+
+#define cropElemAtUintO(self, index) (self)->f->cropElemAtUint(self, index)
+#define cropElemAtUintG cropElemAtUintO
+
+#define cropElemAtUint32O(self, index) (self)->f->cropElemAtUint32(self, index)
+#define cropElemAtUint32G cropElemAtUint32O
+
+#define cropElemAtSO(self, index) (self)->f->cropElemAtS(self, index)
+#define cropElemAtSG cropElemAtSO
+
+#define cropElemAtCharO(self, index) (self)->f->cropElemAtChar(self, index)
+#define cropElemAtCharG cropElemAtCharO
+
+#define cropElemAtDictO(self, index) (self)->f->cropElemAtDict(self, index)
+#define cropElemAtDictG cropElemAtDictO
+
+#define cropElemAtArrayO(self, index) (self)->f->cropElemAtArray(self, index)
+#define cropElemAtArrayG cropElemAtArrayO
+
+#define cropElemAtSmallBoolO(self, index) (self)->f->cropElemAtSmallBool(self, index)
+#define cropElemAtSmallBoolG cropElemAtSmallBoolO
+
+#define cropElemAtSmallBytesO(self, index) (self)->f->cropElemAtSmallBytes(self, index)
+#define cropElemAtSmallBytesG cropElemAtSmallBytesO
+
+#define cropElemAtSmallDoubleO(self, index) (self)->f->cropElemAtSmallDouble(self, index)
+#define cropElemAtSmallDoubleG cropElemAtSmallDoubleO
+
+#define cropElemAtSmallIntO(self, index) (self)->f->cropElemAtSmallInt(self, index)
+#define cropElemAtSmallIntG cropElemAtSmallIntO
+
+#define cropElemAtSmallStringO(self, index) (self)->f->cropElemAtSmallString(self, index)
+#define cropElemAtSmallStringG cropElemAtSmallStringO
+
+#define cropElemAtVoidO(self, index) (self)->f->cropElemAtVoid(self, index)
+#define cropElemAtVoidG cropElemAtVoidO
+
+#define cropElemAtSmallContainerO(self, index) (self)->f->cropElemAtSmallContainer(self, index)
+#define cropElemAtSmallContainerG cropElemAtSmallContainerO
+
+#define cropElemKeyO(self, key) (self)->f->cropElemKey(self, key)
+#define cropElemKeyG cropElemKeyO
+
+#define cropElemKeyUndefinedO(self, key) (self)->f->cropElemKeyUndefined(self, key)
+#define cropElemKeyUndefinedG cropElemKeyUndefinedO
+
+#define cropElemKeyBoolO(self, key) (self)->f->cropElemKeyBool(self, key)
+#define cropElemKeyBoolG cropElemKeyBoolO
+
+#define cropElemKeyDoubleO(self, key) (self)->f->cropElemKeyDouble(self, key)
+#define cropElemKeyDoubleG cropElemKeyDoubleO
+
+#define cropElemKeyIntO(self, key) (self)->f->cropElemKeyInt(self, key)
+#define cropElemKeyIntG cropElemKeyIntO
+
+#define cropElemKeyInt32O(self, key) (self)->f->cropElemKeyInt32(self, key)
+#define cropElemKeyInt32G cropElemKeyInt32O
+
+#define cropElemKeyUintO(self, key) (self)->f->cropElemKeyUint(self, key)
+#define cropElemKeyUintG cropElemKeyUintO
+
+#define cropElemKeyUint32O(self, key) (self)->f->cropElemKeyUint32(self, key)
+#define cropElemKeyUint32G cropElemKeyUint32O
+
+#define cropElemKeySO(self, key) (self)->f->cropElemKeyS(self, key)
+#define cropElemKeySG cropElemKeySO
+
+#define cropElemKeyDictO(self, key) (self)->f->cropElemKeyDict(self, key)
+#define cropElemKeyDictG cropElemKeyDictO
+
+#define cropElemKeyArrayO(self, key) (self)->f->cropElemKeyArray(self, key)
+#define cropElemKeyArrayG cropElemKeyArrayO
+
+#define cropElemKeySmallBoolO(self, key) (self)->f->cropElemKeySmallBool(self, key)
+#define cropElemKeySmallBoolG cropElemKeySmallBoolO
+
+#define cropElemKeySmallBytesO(self, key) (self)->f->cropElemKeySmallBytes(self, key)
+#define cropElemKeySmallBytesG cropElemKeySmallBytesO
+
+#define cropElemKeySmallDoubleO(self, key) (self)->f->cropElemKeySmallDouble(self, key)
+#define cropElemKeySmallDoubleG cropElemKeySmallDoubleO
+
+#define cropElemKeySmallIntO(self, key) (self)->f->cropElemKeySmallInt(self, key)
+#define cropElemKeySmallIntG cropElemKeySmallIntO
+
+#define cropElemKeySmallStringO(self, key) (self)->f->cropElemKeySmallString(self, key)
+#define cropElemKeySmallStringG cropElemKeySmallStringO
+
+#define cropElemKeyVoidO(self, key) (self)->f->cropElemKeyVoid(self, key)
+#define cropElemKeyVoidG cropElemKeyVoidO
+
+#define cropElemKeySmallContainerO(self, key) (self)->f->cropElemKeySmallContainer(self, key)
+#define cropElemKeySmallContainerG cropElemKeySmallContainerO
+
#define insertJsonO(self, index, toInsert) (self)->f->insertJson(self, index, toInsert)
#define insertJsonG insertJsonO
@@ -9464,6 +9978,19 @@ bool writeTextCG(const char **list, const char *filePath);
bool writeTextStreamCG(const char **list, FILE *fp);
/**
+ * call appendFileS (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendFileSG(const char *string, const char *filePath);
+
+/**
+ * call appendText (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendTextSG(char **list, const char *filePath);
+bool appendTextCG(const char **list, const char *filePath);
+
+/**
* recursive mkdir
*
* \param
diff --git a/release/libsheepySmall.c b/release/libsheepySmall.c
@@ -232,9 +232,11 @@ sBoolt* allocSBool(bool value) {
sContainert* allocSContainer(void *data) {
sContainert *r = NULL;
- r = malloc(sizeof(sContainert));
- r->type = CONTAINER;
- r->data = data;
+ r = malloc(sizeof(sContainert));
+ r->type = CONTAINER;
+ r->dataType = SH_DT_UNKNOWN;
+ r->data = data;
+ r->free = NULL;
return(r);
}
@@ -375,6 +377,7 @@ void sFree(smallt *obj) {
* obj object to free
*/
void sFreeTiny(smallt *obj) {
+ sContainert *c = NULL;
switch(obj->type) {
case DICT:
@@ -383,6 +386,14 @@ void sFreeTiny(smallt *obj) {
case ARRAY:
sArrayFreeTiny((sArrayt *) obj);
break;
+ case CONTAINER:
+ c = (sContainert*)obj;
+ if (c->free) {
+ c->free(c->data);
+ c->data = NULL;
+ }
+ free(obj);
+ break;
default:
free(obj);
}
@@ -486,6 +497,7 @@ smallt* sDuplicate(smallt *o) {
smallt* sDuplicateTiny(smallt *obj) {
smallt *r = NULL;
sBytest *B = NULL;
+ sContainert *c = NULL;
switch(obj->type) {
case UNDEFINED:
@@ -496,7 +508,10 @@ smallt* sDuplicateTiny(smallt *obj) {
break;
case CONTAINER:
// data is not copied, same data pointer is used
- r = (smallt *)allocSContainer(((sContainert *)obj)->data);
+ c = allocSContainer(((sContainert *)obj)->data);
+ c->dataType = ((sContainert *)obj)->dataType;
+ c->free = ((sContainert *)obj)->free;
+ r = (smallt *)c;
break;
case DICT:
r = (smallt *)sDictDuplicateTiny((sDictt *)obj);
diff --git a/release/libsheepySmall.h b/release/libsheepySmall.h
@@ -79,12 +79,18 @@ typedef struct {
/**
* small container holding a pointer to a buffer
*/
+typedef void (*freeSContainerFt)(void *data);
typedef struct {
char type;
+ char dataType;
// data is an array of size size
void *data;
+ freeSContainerFt free;
} sContainert;
+// libsheepy dataTypes in sContainert (SH for libsheepy, DT for dataType)
+enum { SH_DT_UNKNOWN, SH_DT_BASET};
+
/**
* dictionary element: key, value
*/
diff --git a/src/json/libsheepyCSmallArray.c b/src/json/libsheepyCSmallArray.c
@@ -179,6 +179,26 @@ internal smallArrayt* shiftNSmashSmallArray(smallArrayt *self, smallArrayt *arra
internal smallArrayt* shiftNSmashSmallJsonSmallArray(smallArrayt *self, smallJsont *json);
internal smallArrayt* addSmallArray(smallArrayt *self, smallArrayt *array);
internal smallArrayt* sliceSmallArray(smallArrayt *self, intmax_t start, intmax_t end);
+internal smallArrayt* cropSmallArray(smallArrayt *self, intmax_t start, intmax_t end);
+internal baset* cropElemSmallArray(smallArrayt *self, intmax_t index);
+internal undefinedt* cropElemUndefinedSmallArray(smallArrayt *self, intmax_t index);
+internal bool cropElemBoolSmallArray(smallArrayt *self, intmax_t index);
+internal double cropElemDoubleSmallArray(smallArrayt *self, intmax_t index);
+internal int64_t cropElemIntSmallArray(smallArrayt *self, intmax_t index);
+internal int32_t cropElemInt32SmallArray(smallArrayt *self, intmax_t index);
+internal uint64_t cropElemUintSmallArray(smallArrayt *self, intmax_t index);
+internal uint32_t cropElemUint32SmallArray(smallArrayt *self, intmax_t index);
+internal char* cropElemSSmallArray(smallArrayt *self, intmax_t index);
+internal smallDictt* cropElemDictSmallArray(smallArrayt *self, intmax_t index);
+internal smallArrayt* cropElemArraySmallArray(smallArrayt *self, intmax_t index);
+internal smallBoolt* cropElemSmallBoolSmallArray(smallArrayt *self, intmax_t index);
+internal smallBytest* cropElemSmallBytesSmallArray(smallArrayt *self, intmax_t index);
+internal smallDoublet* cropElemSmallDoubleSmallArray(smallArrayt *self, intmax_t index);
+internal smallIntt* cropElemSmallIntSmallArray(smallArrayt *self, intmax_t index);
+internal smallJsont* cropElemSmallJsonSmallArray(smallArrayt *self, intmax_t index);
+internal smallStringt* cropElemSmallStringSmallArray(smallArrayt *self, intmax_t index);
+internal void* cropElemVoidSmallArray(smallArrayt *self, intmax_t index);
+internal smallContainert* cropElemSmallContainerSmallArray(smallArrayt *self, intmax_t index);
internal smallArrayt* copySmallArray(smallArrayt *self, intmax_t start, intmax_t end);
internal smallArrayt* insertSmallArray(smallArrayt *self, intmax_t index, smallArrayt *toInsert);
internal smallArrayt* insertSmallJsonSmallArray(smallArrayt *self, intmax_t index, smallJsont *toInsert);
@@ -677,6 +697,26 @@ smallArrayt* shiftNSmashSmallArrayG (smallArrayt *self, smallArrayt *array);
smallArrayt* shiftNSmashSmallJsonSmallArrayG(smallArrayt *self, smallJsont *json);
smallArrayt* addSmallArrayG (smallArrayt *self, smallArrayt *array);
smallArrayt* sliceSmallArrayG(smallArrayt *self, intmax_t start, intmax_t end);
+smallArrayt* cropSmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index);
+undefinedt* cropElemUndefinedSmallArrayG (smallArrayt *self, intmax_t index);
+bool cropElemBoolSmallArrayG (smallArrayt *self, intmax_t index);
+double cropElemDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+int64_t cropElemIntSmallArrayG (smallArrayt *self, intmax_t index);
+int32_t cropElemInt32SmallArrayG (smallArrayt *self, intmax_t index);
+uint64_t cropElemUintSmallArrayG (smallArrayt *self, intmax_t index);
+uint32_t cropElemUint32SmallArrayG (smallArrayt *self, intmax_t index);
+char* cropElemSSmallArrayG (smallArrayt *self, intmax_t index);
+smallDictt* cropElemDictSmallArrayG (smallArrayt *self, intmax_t index);
+smallArrayt* cropElemArraySmallArrayG (smallArrayt *self, intmax_t index);
+smallBoolt* cropElemSmallBoolSmallArrayG (smallArrayt *self, intmax_t index);
+smallBytest* cropElemSmallBytesSmallArrayG (smallArrayt *self, intmax_t index);
+smallDoublet* cropElemSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+smallIntt* cropElemSmallIntSmallArrayG (smallArrayt *self, intmax_t index);
+smallJsont* cropElemSmallJsonSmallArrayG (smallArrayt *self, intmax_t index);
+smallStringt* cropElemSmallStringSmallArrayG (smallArrayt *self, intmax_t index);
+void* cropElemVoidSmallArrayG (smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainerSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
smallArrayt* insertSmallArrayG(smallArrayt *self, intmax_t index, smallArrayt *toInsert);
smallArrayt* insertSmallJsonSmallArrayG (smallArrayt *self, intmax_t index, smallJsont *toInsert);
@@ -851,6 +891,7 @@ bool writeTextSmallArrayG (smallArrayt *self, const char *filePath);
bool writeTextSmallJsonSmallArrayG (smallArrayt *self, smallJsont *filePath);
bool writeTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath);
bool writeStreamSmallArrayG (smallArrayt *self, FILE *fp);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
bool appendTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath);
smallStringt* typeSmallStringSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* typeSmallStringsSmallArrayG(smallArrayt *self);
@@ -862,12 +903,13 @@ void initiateSmallArray(smallArrayt *self) {
smallArrayF = malloc(sizeof(smallArrayFunctionst));
registerMethodsSmallArray(smallArrayF);
}
- self->f = smallArrayF;
+ self->f = smallArrayF;
- self->a = NULL;
- self->iterIndex = -1;;
- self->iterStep = 0;;
- self->iterElement = NULL;;
+ self->a = NULL;
+ self->iterIndex = -1;
+ self->iterStep = 0;
+ self->iterElement = NULL;
+ self->iterElementDataType = 0;
}
void registerMethodsSmallArray(smallArrayFunctionst *f) {
@@ -1050,6 +1092,26 @@ void registerMethodsSmallArray(smallArrayFunctionst *f) {
f->shiftNSmashSmallJson = shiftNSmashSmallJsonSmallArray; {
f->add = addSmallArray;
f->slice = sliceSmallArray;
+ f->crop = cropSmallArray;
+ f->cropElem = cropElemSmallArray;
+ f->cropElemUndefined = cropElemUndefinedSmallArray;
+ f->cropElemBool = cropElemBoolSmallArray;
+ f->cropElemDouble = cropElemDoubleSmallArray;
+ f->cropElemInt = cropElemIntSmallArray;
+ f->cropElemInt32 = cropElemInt32SmallArray;
+ f->cropElemUint = cropElemUintSmallArray;
+ f->cropElemUint32 = cropElemUint32SmallArray;
+ f->cropElemS = cropElemSSmallArray;
+ f->cropElemDict = cropElemDictSmallArray;
+ f->cropElemArray = cropElemArraySmallArray;
+ f->cropElemSmallBool = cropElemSmallBoolSmallArray;
+ f->cropElemSmallBytes = cropElemSmallBytesSmallArray;
+ f->cropElemSmallDouble = cropElemSmallDoubleSmallArray;
+ f->cropElemSmallInt = cropElemSmallIntSmallArray;
+ f->cropElemSmallJson = cropElemSmallJsonSmallArray;
+ f->cropElemSmallString = cropElemSmallStringSmallArray;
+ f->cropElemVoid = cropElemVoidSmallArray;
+ f->cropElemSmallContainer = cropElemSmallContainerSmallArray;
f->copy = copySmallArray;
f->insert = insertSmallArray;
f->insertSmallJson = insertSmallJsonSmallArray;
@@ -1389,6 +1451,7 @@ internal char* toStringSmallArray(smallArrayt *self) {
internal smallArrayt* duplicateSmallArray(smallArrayt *self) {
createAllocateSmallArray(dup);
+ dup->iterElementDataType = self->iterElementDataType;
if (self->a) {
forEachSArray(self->a, o) {
if (o) {
@@ -1466,7 +1529,9 @@ internal const char* helpSmallArray(smallArrayt UNUSED *self) {
internal void resetSmallArray(smallArrayt *self) {
if (self->iterIndex != -1) {
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
self->iterElement = NULL;
self->iterIndex = -1;
}
@@ -1559,8 +1624,7 @@ internal smallArrayt* pushSmallArray(smallArrayt *self, baset *value) {
smallt *o = NULL;
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
o = toSmallt(value);;
sArrayPushTiny(&(self->a), o);
@@ -1599,8 +1663,7 @@ internal smallArrayt* pushSSmallArray(smallArrayt *self, const char *string) {
smallt *o;
if (!string) {
- // create an empty sStringt instead of NULL
- o = (smallt *) allocSStringTiny("");
+ return(NULL);
}
else {
o = (smallt *) allocSStringTiny(string);
@@ -1622,8 +1685,7 @@ internal smallArrayt* pushDictSmallArray(smallArrayt *self, smallDictt *dict) {
}
if (!dict) {
- sArrayPushTiny(&(self->a), (smallt *)allocSDict());
- return(self);
+ return(NULL);
}
if (!dict->d) {
@@ -1642,8 +1704,7 @@ internal smallArrayt* pushArraySmallArray(smallArrayt *self, smallArrayt *array)
}
if (!array) {
- sArrayPushTiny(&(self->a), (smallt *)allocSArray());
- return(self);
+ return(NULL);
}
if (!array->a) {
@@ -1659,8 +1720,7 @@ internal smallArrayt* pushArraycSmallArray(smallArrayt *self, char **array) {
// sanity checks
if (!array) {
- sArrayPushTiny(&(self->a), (smallt *)allocSArray());
- return(self);
+ return(NULL);
}
sArrayt *a = allocSArray();
@@ -1680,8 +1740,7 @@ internal smallArrayt* pushSmallBoolSmallArray(smallArrayt *self, smallBoolt *val
}
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -1696,8 +1755,7 @@ internal smallArrayt* pushSmallBytesSmallArray(smallArrayt *self, smallBytest *v
}
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->B;
@@ -1712,8 +1770,7 @@ internal smallArrayt* pushSmallDoubleSmallArray(smallArrayt *self, smallDoublet
}
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -1728,8 +1785,7 @@ internal smallArrayt* pushSmallIntSmallArray(smallArrayt *self, smallIntt *value
}
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -1744,8 +1800,7 @@ internal smallArrayt* pushSmallJsonSmallArray(smallArrayt *self, smallJsont *val
}
if (!value) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = getsoO(value);
@@ -1759,8 +1814,12 @@ internal smallArrayt* pushSmallStringSmallArray(smallArrayt *self, smallStringt
return(NULL);
}
+ if (!string) {
+ return(NULL);
+ }
+
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -1778,8 +1837,7 @@ internal smallArrayt* pushSmallContainerSmallArray(smallArrayt *self, smallConta
}
if (!container) {
- sArrayPushTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
if (!container->data) {
@@ -1794,23 +1852,35 @@ internal smallArrayt* pushSmallContainerSmallArray(smallArrayt *self, smallConta
internal smallArrayt* pushNFreeSmallArray(smallArrayt *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
+ o = toSmallt(value);;
+ sArrayPushTiny(&(self->a), o);
- pushSmallArray(self, value);
- finishO(value);
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
+ }
return(self);
}
internal smallArrayt* pushNFreeUndefinedSmallArray(smallArrayt *self, undefinedt *undefined) {
- pushUndefinedSmallArray(self);
- terminateO(undefined);
+ smallArrayt *r = pushUndefinedSmallArray(self);;
+ if (r) {
+ terminateO(undefined);
+ }
return(self);
}
internal smallArrayt* pushNFreeSSmallArray(smallArrayt *self, char *string) {
- pushSSmallArray(self, string);
- free(string);
+ smallArrayt *r = pushSSmallArray(self, string);
+ if (r) {
+ free(string);
+ }
return(self);
}
@@ -1820,9 +1890,6 @@ internal smallArrayt* pushNFreeDictSmallArray(smallArrayt *self, smallDictt *dic
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -1832,16 +1899,15 @@ internal smallArrayt* pushNFreeArraySmallArray(smallArrayt *self, smallArrayt *a
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallArrayt* pushNFreeArraycSmallArray(smallArrayt *self, char **array) {
- pushArraycSmallArray(self, array);
- listFreeS(array);
+ smallArrayt *r = pushArraycSmallArray(self, array);
+ if (r) {
+ listFreeS(array);
+ }
return(self);
}
@@ -1851,9 +1917,6 @@ internal smallArrayt* pushNFreeSmallBoolSmallArray(smallArrayt *self, smallBoolt
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1863,9 +1926,6 @@ internal smallArrayt* pushNFreeSmallBytesSmallArray(smallArrayt *self, smallByte
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1875,9 +1935,6 @@ internal smallArrayt* pushNFreeSmallDoubleSmallArray(smallArrayt *self, smallDou
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1887,9 +1944,6 @@ internal smallArrayt* pushNFreeSmallIntSmallArray(smallArrayt *self, smallIntt *
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1899,9 +1953,6 @@ internal smallArrayt* pushNFreeSmallJsonSmallArray(smallArrayt *self, smallJsont
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1911,9 +1962,6 @@ internal smallArrayt* pushNFreeSmallStringSmallArray(smallArrayt *self, smallStr
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -1923,9 +1971,6 @@ internal smallArrayt* pushNFreeSmallContainerSmallArray(smallArrayt *self, small
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
@@ -2022,21 +2067,55 @@ internal baset* popSmallArray(smallArrayt *self) {
}
}
- if (o && (o->type == UNDEFINED)) {
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type == UNDEFINED) {
free(o);
return((baset*) allocUndefined());
}
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(o);
+ free(o);
+ return(r);
+ }
+ }
return(toBaset(o));
}
internal undefinedt* popUndefinedSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- undefinedt *e = (undefinedt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != UNDEFINED) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->a->count--;
+ return(allocUndefined());
}
internal bool popBoolSmallArray(smallArrayt *self) {
@@ -2045,10 +2124,6 @@ internal bool popBoolSmallArray(smallArrayt *self) {
e = popSmallBoolSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2061,10 +2136,6 @@ internal double popDoubleSmallArray(smallArrayt *self) {
e = popSmallDoubleSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2077,10 +2148,6 @@ internal int64_t popIntSmallArray(smallArrayt *self) {
e = popSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2093,10 +2160,6 @@ internal int32_t popInt32SmallArray(smallArrayt *self) {
e = popSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -2109,10 +2172,6 @@ internal uint64_t popUintSmallArray(smallArrayt *self) {
e = popSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -2125,10 +2184,6 @@ internal uint32_t popUint32SmallArray(smallArrayt *self) {
e = popSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -2141,10 +2196,6 @@ internal char* popSSmallArray(smallArrayt *self) {
e = popSmallStringSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -2152,152 +2203,357 @@ internal char* popSSmallArray(smallArrayt *self) {
}
internal smallDictt* popDictSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDictt *e = (smallDictt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallArrayt* popArraySmallArray(smallArrayt *self) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
- smallArrayt *e = (smallArrayt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal smallBoolt* popSmallBoolSmallArray(smallArrayt *self) {
- smallBoolt *e = (smallBoolt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->a->count--;
+ return((smallDictt*)toBaset(o));
}
-internal smallBytest* popSmallBytesSmallArray(smallArrayt *self) {
+internal smallArrayt* popArraySmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallBytest *e = (smallBytest*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallDoublet* popSmallDoubleSmallArray(smallArrayt *self) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
- smallDoublet *e = (smallDoublet*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal smallIntt* popSmallIntSmallArray(smallArrayt *self) {
- smallIntt *e = (smallIntt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->a->count--;
+ return((smallArrayt*)toBaset(o));
}
-internal smallJsont* popSmallJsonSmallArray(smallArrayt *self) {
+internal smallBoolt* popSmallBoolSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- baset *e = popSmallArray(self);
- if (!e) {
+ len = lenSmallArray(self);
+ if (!len) {
return(NULL);
}
- createAllocateSmallJson(r);
- setTopNFreeO(r, e);
- return(r);
-}
-internal smallStringt* popSmallStringSmallArray(smallArrayt *self) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
- smallStringt *e = (smallStringt*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->a->count--;
+ return((smallBoolt*)toBaset(o));
}
-internal void* popVoidSmallArray(smallArrayt *self) {
- smallContainert *e = NULL;
- void* r = NULL;
+internal smallBytest* popSmallBytesSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- e = popSmallContainerSmallArray(self);
- if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
}
- r = e->f->get(e);
- finishO(e);
+ self->a->count--;
}
- return(r);
-}
-internal smallContainert* popSmallContainerSmallArray(smallArrayt *self) {
+ if (!o) {
+ return(NULL);
+ }
- smallContainert *e = (smallContainert*)popSmallArray(self);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (o->type != BYTES) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->a->count--;
+ return((smallBytest*)toBaset(o));
}
-internal double popNumSmallArray(smallArrayt *self) {
+internal smallDoublet* popSmallDoubleSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
- baset *o = popSmallArray(self);
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
if (!o) {
- return(0);
+ return(NULL);
}
- double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
- }
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+ if (o->type != DOUBLE) {
+ return(NULL);
}
- finishO(o);
- return(r);
+
+ // finish poping
+ self->a->count--;
+ return((smallDoublet*)toBaset(o));
}
-internal smallArrayt* prependSmallArray(smallArrayt *self, baset *value) {
+internal smallIntt* popSmallIntSmallArray(smallArrayt *self) {
+ size_t len;
smallt *o = NULL;
- if (!value) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
}
- o = toSmallt(value);;
- sArrayPrependTiny(&(self->a), o);
- return(self);
-}
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
-internal smallArrayt* prependUndefinedSmallArray(smallArrayt *self) {
+ if (!o) {
+ return(NULL);
+ }
- smallt *o = (smallt *) allocSUndefined();
- sArrayPrependTiny(&(self->a), o);
- return(self);
-}
+ if (o->type != INT) {
+ return(NULL);
+ }
-internal smallArrayt* prependBoolSmallArray(smallArrayt *self, bool value) {
+ // finish poping
+ self->a->count--;
+ return((smallIntt*)toBaset(o));
+}
+
+internal smallJsont* popSmallJsonSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->a->count--;
+
+ baset *e = toBaset(o);
+
+ createAllocateSmallJson(r);
+ setTopNFreeO(r, e);
+ return(r);
+}
+
+internal smallStringt* popSmallStringSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->a->count--;
+ return((smallStringt*)toBaset(o));
+}
+
+internal void* popVoidSmallArray(smallArrayt *self) {
+ smallContainert *e = NULL;
+ void* r = NULL;
+
+ e = popSmallContainerSmallArray(self);
+ if (e) {
+ r = e->f->get(e);
+ finishO(e);
+ }
+ return(r);
+}
+
+internal smallContainert* popSmallContainerSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->a->count--;
+ return((smallContainert*)toBaset(o));
+}
+
+internal double popNumSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(0);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->a, self->a->count -1);
+ if (o) {
+ break;
+ }
+ self->a->count--;
+ }
+
+ if (!o) {
+ return(0);
+ }
+
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ baset *e = toBaset(o);
+
+ // finish poping
+ self->a->count--;
+
+ double r = 0;
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
+ }
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
+ }
+ terminateO(e);
+ return(r);
+}
+
+internal smallArrayt* prependSmallArray(smallArrayt *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
+
+ o = toSmallt(value);;
+ sArrayPrependTiny(&(self->a), o);
+ return(self);
+}
+
+internal smallArrayt* prependUndefinedSmallArray(smallArrayt *self) {
+
+ smallt *o = (smallt *) allocSUndefined();
+ sArrayPrependTiny(&(self->a), o);
+ return(self);
+}
+
+internal smallArrayt* prependBoolSmallArray(smallArrayt *self, bool value) {
smallt *o = (smallt *) allocSBool(value);
sArrayPrependTiny(&(self->a), o);
@@ -2322,8 +2578,7 @@ internal smallArrayt* prependSSmallArray(smallArrayt *self, const char *string)
smallt *o;
if (!string) {
- // create an empty sStringt instead of NULL
- o = (smallt *) allocSStringTiny("");
+ return(NULL);
}
else {
o = (smallt *) allocSStringTiny(string);
@@ -2345,8 +2600,7 @@ internal smallArrayt* prependDictSmallArray(smallArrayt *self, smallDictt *dict)
}
if (!dict) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSDict());
- return(self);
+ return(NULL);
}
if (!dict->d) {
@@ -2365,8 +2619,7 @@ internal smallArrayt* prependArraySmallArray(smallArrayt *self, smallArrayt *arr
}
if (!array) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSArray());
- return(self);
+ return(NULL);
}
if (!array->a) {
@@ -2381,8 +2634,7 @@ internal smallArrayt* prependArraySmallArray(smallArrayt *self, smallArrayt *arr
internal smallArrayt* prependArraycSmallArray(smallArrayt *self, char **array) {
if (!array) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSArray());
- return(self);
+ return(NULL);
}
sArrayt *a = allocSArray();
@@ -2402,8 +2654,7 @@ internal smallArrayt* prependSmallBoolSmallArray(smallArrayt *self, smallBoolt *
}
if (!value) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -2418,8 +2669,7 @@ internal smallArrayt* prependSmallBytesSmallArray(smallArrayt *self, smallBytest
}
if (!value) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->B;
@@ -2434,8 +2684,7 @@ internal smallArrayt* prependSmallDoubleSmallArray(smallArrayt *self, smallDoubl
}
if (!value) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -2450,8 +2699,7 @@ internal smallArrayt* prependSmallIntSmallArray(smallArrayt *self, smallIntt *va
}
if (!value) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = (smallt *) value->value;
@@ -2466,8 +2714,7 @@ internal smallArrayt* prependSmallJsonSmallArray(smallArrayt *self, smallJsont *
}
if (!json) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
smallt *o = getsoO(json);
@@ -2481,8 +2728,12 @@ internal smallArrayt* prependSmallStringSmallArray(smallArrayt *self, smallStrin
return(NULL);
}
+ if (!string) {
+ return(NULL);
+ }
+
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -2500,8 +2751,7 @@ internal smallArrayt* prependSmallContainerSmallArray(smallArrayt *self, smallCo
}
if (!container) {
- sArrayPrependTiny(&(self->a), (smallt *)allocSUndefined());
- return(self);
+ return(NULL);
}
if (!container->data) {
@@ -2516,23 +2766,36 @@ internal smallArrayt* prependSmallContainerSmallArray(smallArrayt *self, smallCo
internal smallArrayt* prependNFreeSmallArray(smallArrayt *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
+
+ o = toSmallt(value);;
+ sArrayPrependTiny(&(self->a), o);
- prependSmallArray(self, value);
- finishO(value);
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
+ }
return(self);
}
internal smallArrayt* prependNFreeUndefinedSmallArray(smallArrayt *self, undefinedt *undefined) {
- prependUndefinedSmallArray(self);
- terminateO(undefined);
+ smallArrayt *r = prependUndefinedSmallArray(self);;
+ if (r) {
+ terminateO(undefined);
+ }
return(self);
}
internal smallArrayt* prependNFreeSSmallArray(smallArrayt *self, char *string) {
- prependSSmallArray(self, string);
- free(string);
+ smallArrayt *r = prependSSmallArray(self, string);
+ if (r) {
+ free(string);
+ }
return(self);
}
@@ -2542,9 +2805,6 @@ internal smallArrayt* prependNFreeDictSmallArray(smallArrayt *self, smallDictt *
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -2554,16 +2814,15 @@ internal smallArrayt* prependNFreeArraySmallArray(smallArrayt *self, smallArrayt
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallArrayt* prependNFreeArraycSmallArray(smallArrayt *self, char **array) {
- prependArraycSmallArray(self, array);
- listFreeS(array);
+ smallArrayt *r = prependArraycSmallArray(self, array);
+ if (r) {
+ listFreeS(array);
+ }
return(self);
}
@@ -2573,9 +2832,6 @@ internal smallArrayt* prependNFreeSmallBoolSmallArray(smallArrayt *self, smallBo
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -2585,9 +2841,6 @@ internal smallArrayt* prependNFreeSmallBytesSmallArray(smallArrayt *self, smallB
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -2597,9 +2850,6 @@ internal smallArrayt* prependNFreeSmallDoubleSmallArray(smallArrayt *self, small
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -2609,9 +2859,6 @@ internal smallArrayt* prependNFreeSmallIntSmallArray(smallArrayt *self, smallInt
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -2621,9 +2868,6 @@ internal smallArrayt* prependNFreeSmallJsonSmallArray(smallArrayt *self, smallJs
if (r) {
finishO(json);
}
- else {
- terminateO(json);
- }
return(r);
}
@@ -2633,9 +2877,6 @@ internal smallArrayt* prependNFreeSmallStringSmallArray(smallArrayt *self, small
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -2645,9 +2886,6 @@ internal smallArrayt* prependNFreeSmallContainerSmallArray(smallArrayt *self, sm
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
@@ -2667,21 +2905,61 @@ internal baset* dequeueSmallArray(smallArrayt *self) {
}
}
- if (o && (o->type == UNDEFINED)) {
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type == UNDEFINED) {
free(o);
return((baset*) allocUndefined());
}
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(o);
+ free(o);
+ return(r);
+ }
+ }
return(toBaset(o));
}
internal undefinedt* dequeueUndefinedSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- undefinedt *e = (undefinedt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != UNDEFINED) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return(allocUndefined());
}
internal bool dequeueBoolSmallArray(smallArrayt *self) {
@@ -2690,10 +2968,6 @@ internal bool dequeueBoolSmallArray(smallArrayt *self) {
e = dequeueSmallBoolSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2706,10 +2980,6 @@ internal double dequeueDoubleSmallArray(smallArrayt *self) {
e = dequeueSmallDoubleSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2722,10 +2992,6 @@ internal int64_t dequeueIntSmallArray(smallArrayt *self) {
e = dequeueSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -2738,10 +3004,6 @@ internal int32_t dequeueInt32SmallArray(smallArrayt *self) {
e = dequeueSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -2754,10 +3016,6 @@ internal uint64_t dequeueUintSmallArray(smallArrayt *self) {
e = dequeueSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -2770,10 +3028,6 @@ internal uint32_t dequeueUint32SmallArray(smallArrayt *self) {
e = dequeueSmallIntSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -2786,10 +3040,6 @@ internal char* dequeueSSmallArray(smallArrayt *self) {
e = dequeueSmallStringSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -2797,84 +3047,295 @@ internal char* dequeueSSmallArray(smallArrayt *self) {
}
internal smallDictt* dequeueDictSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDictt *e = (smallDictt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != DICT) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallDictt*) toBaset(o));
}
internal smallArrayt* dequeueArraySmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallArrayt *e = (smallArrayt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallArrayt*) toBaset(o));
}
internal smallBoolt* dequeueSmallBoolSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallBoolt *e = (smallBoolt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != BOOL) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallBoolt*) toBaset(o));
}
internal smallBytest* dequeueSmallBytesSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallBytest *e = (smallBytest*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != BYTES) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallBytest*) toBaset(o));
}
internal smallDoublet* dequeueSmallDoubleSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDoublet *e = (smallDoublet*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != DOUBLE) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallDoublet*) toBaset(o));
}
internal smallIntt* dequeueSmallIntSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallIntt *e = (smallIntt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
return(NULL);
}
- return(e);
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != INT) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallIntt*) toBaset(o));
}
internal smallJsont* dequeueSmallJsonSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- baset *e = dequeueSmallArray(self);
- if (!e) {
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
return(NULL);
}
+
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ baset *e = toBaset(o);
+
createAllocateSmallJson(r);
setTopNFreeO(r, e);
return(r);
}
internal smallStringt* dequeueSmallStringSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallStringt *e = (smallStringt*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallStringt*) toBaset(o));
}
internal void* dequeueVoidSmallArray(smallArrayt *self) {
@@ -2883,10 +3344,6 @@ internal void* dequeueVoidSmallArray(smallArrayt *self) {
e = dequeueSmallContainerSmallArray(self);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -2894,31 +3351,88 @@ internal void* dequeueVoidSmallArray(smallArrayt *self) {
}
internal smallContainert* dequeueSmallContainerSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
- smallContainert *e = (smallContainert*)dequeueSmallArray(self);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ len = lenSmallArray(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ return((smallContainert*) toBaset(o));
}
internal double dequeueNumSmallArray(smallArrayt *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ if (!len) {
+ return(0);
+ }
- baset *o = dequeueSmallArray(self);
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->a, i);
+ if (o) {
+ break;
+ }
+ }
if (!o) {
return(0);
}
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->a->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->a->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->a->count -= i+1;;
+
+ baset *e = toBaset(o);
+
double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
}
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
}
- finishO(o);
+ finishO(e);
return(r);
}
@@ -3065,6 +3579,7 @@ internal smallArrayt* appendNSmashArraySmallArray(smallArrayt *self, char **arra
}
if (!*array) {
+ free(array);
return(self);
}
@@ -3179,7 +3694,7 @@ internal smallArrayt* sliceSmallArray(smallArrayt *self, intmax_t start, intmax_
return(self);
}
-internal smallArrayt* copySmallArray(smallArrayt *self, intmax_t start, intmax_t end) {
+internal smallArrayt* cropSmallArray(smallArrayt *self, intmax_t start, intmax_t end) {
size_t len;
smallt *o = NULL;
@@ -3189,7 +3704,7 @@ internal smallArrayt* copySmallArray(smallArrayt *self, intmax_t start, intmax_t
return(NULL);
}
- if (start >= (intmax_t)len) {
+ if (start > (intmax_t)len) {
return(NULL);
}
if (end > (intmax_t)len) {
@@ -3213,40 +3728,837 @@ internal smallArrayt* copySmallArray(smallArrayt *self, intmax_t start, intmax_t
createAllocateSmallArray(r);
- if (start == end) {
- // empty list
- return(r);
- }
- else {
+ if (start < end) {
// start < end < len
intmax_t n;
n = end - start;
for (intmax_t i=0;i < n;i++) {
o = sArrayGetTiny(self->a, start+i);
- sArrayPushTiny(&(r->a), sDuplicate(o));
- }
+ sArrayPushTiny(&(r->a), o);
}
+ // copy pointers from range end, array->count to start
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - end) ; i ++) {
+ arr[start+i] = arr[end + i];
+ }
+
+ self->a->count -= end - start;
+ }
+
return(r);
}
-internal smallArrayt* insertSmallArray(smallArrayt *self, intmax_t index, smallArrayt *toInsert) {
- size_t len;;
+internal baset* cropElemSmallArray(smallArrayt *self, intmax_t index) {
+ baset *r = NULL;
- //sanity checks
- if (checkObjectTypes && toInsert && !isOSmallArray(toInsert)) {
+ if (index >= (intmax_t)lenSmallArray(self)) {
return(NULL);
}
-
- if (!toInsert || !toInsert->f->len(toInsert)) {
+ if (index < -(intmax_t)lenSmallArray(self)) {
return(NULL);
}
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
- len = lenSmallArray(self);
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
- if (!len && index == -1) {
- // empty string, index -1 is equal to 0
+ if (o->type == UNDEFINED) {
+ free(o);
+ r = (baset*) allocUndefined();
+ goto removeElem;
+ }
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ r = toBaset(o);
+ free(o);
+ goto removeElem;
+ }
+ }
+ r = toBaset(o);;
+
+ removeElem:;
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+
+internal undefinedt* cropElemUndefinedSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+
+ free(o);
+ undefinedt *r = allocUndefined();
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+
+internal bool cropElemBoolSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(false);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(false);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ bool r = false;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(false);
+ }
+ smallBoolt *e = (smallBoolt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallBool(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(false);
+ }
+ finishO(e);
+ return(false);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal double cropElemDoubleSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ double r = 0;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(0);
+ }
+ smallDoublet *e = (smallDoublet*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallDouble(e)) {
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal int64_t cropElemIntSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ int64_t r = 0;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+
+internal int32_t cropElemInt32SmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ int32_t r = 0;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal uint64_t cropElemUintSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ uint64_t r = 0;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal uint32_t cropElemUint32SmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ uint32_t r = 0;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal char* cropElemSSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ char *r = NULL;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallStringt *e = (smallStringt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallString(e)) {
+ finishO(e);
+ return(NULL);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal smallDictt* cropElemDictSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallDictt *r = (smallDictt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallDict(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallArrayt* cropElemArraySmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallArrayt *r = (smallArrayt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallArray(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallBoolt* cropElemSmallBoolSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallBoolt *r = (smallBoolt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallBool(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallBytest* cropElemSmallBytesSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallBytest *r = (smallBytest*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallBytes(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallDoublet* cropElemSmallDoubleSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallDoublet *r = (smallDoublet*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallDouble(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallIntt* cropElemSmallIntSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallIntt *r = (smallIntt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallInt(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallJsont* cropElemSmallJsonSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+ baset *e = toBaset(o);
+ if (!e) {
+ finishO(e);
+ return(NULL);
+ }
+ createAllocateSmallJson(r);
+ setTopNFreeO(r, e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallStringt* cropElemSmallStringSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallStringt *r = (smallStringt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallString(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal void* cropElemVoidSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ void *r = NULL;
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallContainert *e = (smallContainert*)toBaset(o);
+ if (e) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && !isOSmallContainer(e)) {
+ finishO(e);
+ return(false);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+ }
+
+ return(r);
+}
+
+internal smallContainert* cropElemSmallContainerSmallArray(smallArrayt *self, intmax_t index) {
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallContainert *r = (smallContainert*)toBaset(o);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && r && !isOSmallContainer(r)) {
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->a->data);
+
+ for (uint32_t i = 0 ; i < (self->a->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->a->count--;
+
+ return(r);
+}
+
+internal smallArrayt* copySmallArray(smallArrayt *self, intmax_t start, intmax_t end) {
+ size_t len;
+ smallt *o = NULL;
+
+ len = lenSmallArray(self);
+ // sanity checks
+ if (!len) {
+ return(NULL);
+ }
+
+ if (start >= (intmax_t)len) {
+ return(NULL);
+ }
+ if (end > (intmax_t)len) {
+ end = len;
+ }
+ if (start <= -(intmax_t)len) {
+ start = -len;
+ }
+ if (end <= -(intmax_t)len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ createAllocateSmallArray(r);
+
+ if (start == end) {
+ // empty list
+ return(r);
+ }
+ else {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+
+ for (intmax_t i=0;i < n;i++) {
+ o = sArrayGetTiny(self->a, start+i);
+ sArrayPushTiny(&(r->a), sDuplicate(o));
+ }
+ }
+
+ return(r);
+}
+
+internal smallArrayt* insertSmallArray(smallArrayt *self, intmax_t index, smallArrayt *toInsert) {
+ size_t len;;
+
+ //sanity checks
+ if (checkObjectTypes && toInsert && !isOSmallArray(toInsert)) {
+ return(NULL);
+ }
+
+ if (!toInsert) {
+ return(NULL);
+ }
+
+ len = lenSmallArray(self);
+
+ if (!len && index == -1) {
+ // empty array, index -1 is equal to 0
index = 0;
}
bool neg = false;
@@ -3268,6 +4580,10 @@ internal smallArrayt* insertSmallArray(smallArrayt *self, intmax_t index, smallA
}
+ if (!toInsert->f->len(toInsert)) {
+ return(self);
+ }
+
sArrayt *a = allocSArray();;
smallt *o;
@@ -3328,14 +4644,9 @@ internal smallArrayt* insertNSmashSmallArray(smallArrayt *self, intmax_t index,
smallArrayt *r = NULL;
r = insertSmallArray(self, index, toInsert);
- if (toInsert) {
- if (r) {
- smashO(toInsert);
- }
- else {
- terminateO(toInsert);
+ if (r) {
+ smashO(toInsert);
}
- }
return(r);
}
@@ -3343,14 +4654,9 @@ internal smallArrayt* insertNSmashSmallJsonSmallArray(smallArrayt *self, intmax_
smallArrayt *r = NULL;
r = insertSmallJsonSmallArray(self, index, toInsert);
- if (toInsert) {
- if (r) {
- smashO(toInsert);
- }
- else {
- terminateO(toInsert);
+ if (r) {
+ smashO(toInsert);
}
- }
return(r);
}
@@ -3358,6 +4664,10 @@ internal smallArrayt* insertNSmashSmallJsonSmallArray(smallArrayt *self, intmax_
internal smallArrayt* injectSmallArray(smallArrayt *self, intmax_t index, baset *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
len = lenSmallArray(self);
if (!len && index == -1) {
@@ -3385,13 +4695,7 @@ internal smallArrayt* injectSmallArray(smallArrayt *self, intmax_t index, baset
sArrayt *a = allocSArray();
- smallt *o = NULL;
- if (toInject) {
- o = toSmallt(toInject);
- }
- else {
- o = (smallt *) allocSUndefined();
- }
+ smallt *o = toSmallt(toInject);
if (index == 0) {
// inject at beginning
@@ -3662,6 +4966,10 @@ internal smallArrayt* injectIntSmallArray(smallArrayt *self, intmax_t index, int
internal smallArrayt* injectSSmallArray(smallArrayt *self, intmax_t index, const char *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
len = lenSmallArray(self);
if (!len && index == -1) {
@@ -3689,13 +4997,7 @@ internal smallArrayt* injectSSmallArray(smallArrayt *self, intmax_t index, const
sArrayt *a = allocSArray();
- smallt *o;
- if (toInject) {
- o = (smallt *) allocSStringTiny(toInject);
- }
- else {
- o = (smallt *) allocSStringTiny("");
- }
+ smallt *o = (smallt *) allocSStringTiny(toInject);
if (index == 0) {
// inject at beginning
@@ -3733,6 +5035,10 @@ internal smallArrayt* injectCharSmallArray(smallArrayt *self, intmax_t index, ch
internal smallArrayt* injectDictSmallArray(smallArrayt *self, intmax_t index, smallDictt *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallDict(toInject)) {
return(NULL);
}
@@ -3764,13 +5070,7 @@ internal smallArrayt* injectDictSmallArray(smallArrayt *self, intmax_t index, sm
sArrayt *a = allocSArray();;
- smallt *o = NULL;
- if (toInject) {
- o = (smallt *) toInject->d;
- }
- else {
- o = (smallt *) allocSDict();
- }
+ smallt *o = (smallt *) toInject->d;
if (index == 0) {
// inject at beginning
@@ -3802,6 +5102,10 @@ internal smallArrayt* injectDictSmallArray(smallArrayt *self, intmax_t index, sm
internal smallArrayt* injectArraySmallArray(smallArrayt *self, intmax_t index, smallArrayt *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallArray(toInject)) {
return(NULL);
}
@@ -3833,13 +5137,7 @@ internal smallArrayt* injectArraySmallArray(smallArrayt *self, intmax_t index, s
sArrayt *a = allocSArray();;
- smallt *o = NULL;
- if (toInject) {
- o = (smallt *) toInject->a;
- }
- else {
- o = (smallt *) allocSArray();
- }
+ smallt *o = (smallt *) toInject->a;
if (index == 0) {
// inject at beginning
@@ -3871,6 +5169,10 @@ internal smallArrayt* injectArraySmallArray(smallArrayt *self, intmax_t index, s
internal smallArrayt* injectArraycSmallArray(smallArrayt *self, intmax_t index, char **toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
len = lenSmallArray(self);
if (!len && index == -1) {
@@ -3896,21 +5198,16 @@ internal smallArrayt* injectArraycSmallArray(smallArrayt *self, intmax_t index,
}
- sArrayt *a = allocSArray();;
+ sArrayt *a = allocSArray();;
- smallt *o = NULL;
- if (toInject) {
- sArrayt *aa = allocSArray();
+ smallt *o = NULL;
+ sArrayt *aa = allocSArray();
- forEachCharP(toInject, e) {
- sStringt *s = allocSStringTiny(*e);
- sArrayPushTiny(&aa, (smallt *) s);
- }
- o = (smallt *) aa;
- }
- else {
- o = (smallt *) allocSArray();
+ forEachCharP(toInject, e) {
+ sStringt *s = allocSStringTiny(*e);
+ sArrayPushTiny(&aa, (smallt *) s);
}
+ o = (smallt *) aa;
if (index == 0) {
// inject at beginning
@@ -3941,6 +5238,10 @@ internal smallArrayt* injectArraycSmallArray(smallArrayt *self, intmax_t index,
internal smallArrayt* injectSmallBoolSmallArray(smallArrayt *self, intmax_t index, smallBoolt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallBool(toInject)) {
return(NULL);
}
@@ -3950,6 +5251,10 @@ internal smallArrayt* injectSmallBoolSmallArray(smallArrayt *self, intmax_t inde
internal smallArrayt* injectSmallBytesSmallArray(smallArrayt *self, intmax_t index, smallBytest *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallBytes(toInject)) {
return(NULL);
}
@@ -3959,6 +5264,10 @@ internal smallArrayt* injectSmallBytesSmallArray(smallArrayt *self, intmax_t ind
internal smallArrayt* injectSmallDoubleSmallArray(smallArrayt *self, intmax_t index, smallDoublet *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallDouble(toInject)) {
return(NULL);
}
@@ -3968,6 +5277,10 @@ internal smallArrayt* injectSmallDoubleSmallArray(smallArrayt *self, intmax_t in
internal smallArrayt* injectSmallIntSmallArray(smallArrayt *self, intmax_t index, smallIntt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallInt(toInject)) {
return(NULL);
}
@@ -3977,6 +5290,10 @@ internal smallArrayt* injectSmallIntSmallArray(smallArrayt *self, intmax_t index
internal smallArrayt* injectSmallJsonSmallArray(smallArrayt *self, intmax_t index, smallJsont *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallJson(toInject)) {
return(NULL);
}
@@ -3993,6 +5310,10 @@ internal smallArrayt* injectSmallJsonSmallArray(smallArrayt *self, intmax_t inde
internal smallArrayt* injectSmallStringSmallArray(smallArrayt *self, intmax_t index, smallStringt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallString(toInject)) {
return(NULL);
}
@@ -4006,6 +5327,10 @@ internal smallArrayt* injectSmallStringSmallArray(smallArrayt *self, intmax_t in
internal smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallContainer(toInject)) {
return(NULL);
}
@@ -4014,23 +5339,88 @@ internal smallArrayt* injectSmallContainerSmallArray(smallArrayt *self, intmax_t
}
internal smallArrayt* injectNFreeSmallArray(smallArrayt *self, intmax_t index, baset *toInject) {
+ size_t len;
+
+ if (!toInject) {
+ return(NULL);
+ }
+
+ len = lenSmallArray(self);
+
+ if (!len && index == -1) {
+ // empty string, index -1 is equal to 0
+ index = 0;
+ }
+ bool neg = false;
+ if (index < 0) {
+ neg = true;
+ }
+
+ if (index > (intmax_t)len) {
+ return(NULL);
+ }
+ if (neg) {
+ index++;
+ }
+ if (index < -(intmax_t)len) {
+ return(NULL);
+ }
+ if (neg) {
+ index = len + index;
+ }
+
+
+ sArrayt *a = allocSArray();
+
+ smallt *o = toSmallt(toInject);
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(toInject);
+ }
+
+ if (index == 0) {
+ // inject at beginning
+ sArrayPushTiny(&a, o);
+ for (intmax_t i=0;i < (intmax_t)len;i++) {
+ o = sArrayGetTiny(self->a, i);
+ sArrayPushTiny(&a, o);
+ }
+ }
+ else {
+
+ smallt *o2;
+ for (intmax_t i=0;i < index;i++) {
+ o2 = sArrayGetTiny(self->a, i);
+ sArrayPushTiny(&a, o2);
+ }
+ sArrayPushTiny(&a, o);
+ for (intmax_t i=index;i < (intmax_t)len;i++) {
+ o = sArrayGetTiny(self->a, i);
+ sArrayPushTiny(&a, o);
+ }
+ }
+
+ free(self->a);
+ self->a = a;
- injectSmallArray(self, index, toInject);
- finishO(toInject);
return(self);
}
internal smallArrayt* injectNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined) {
- injectUndefinedSmallArray(self, index);
- terminateO(undefined);
+ smallArrayt *r = injectUndefinedSmallArray(self, index);
+ if (r) {
+ terminateO(undefined);
+ }
return(self);
}
internal smallArrayt* injectNFreeSSmallArray(smallArrayt *self, intmax_t index, char *toInject) {
- injectSSmallArray(self, index, toInject);
- free(toInject);
+ smallArrayt *r = injectSSmallArray(self, index, toInject);
+ if (r) {
+ free(toInject);
+ }
return(self);
}
@@ -4040,9 +5430,6 @@ internal smallArrayt* injectNFreeDictSmallArray(smallArrayt *self, intmax_t inde
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4052,16 +5439,15 @@ internal smallArrayt* injectNFreeArraySmallArray(smallArrayt *self, intmax_t ind
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallArrayt* injectNFreeArraycSmallArray(smallArrayt *self, intmax_t index, char **toInject) {
- injectArraycSmallArray(self, index, toInject);
- listFreeS(toInject);
+ smallArrayt *r = injectArraycSmallArray(self, index, toInject);
+ if (r) {
+ listFreeS(toInject);
+ }
return(self);
}
@@ -4071,9 +5457,6 @@ internal smallArrayt* injectNFreeSmallBoolSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4083,9 +5466,6 @@ internal smallArrayt* injectNFreeSmallBytesSmallArray(smallArrayt *self, intmax_
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4095,9 +5475,6 @@ internal smallArrayt* injectNFreeSmallDoubleSmallArray(smallArrayt *self, intmax
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4107,9 +5484,6 @@ internal smallArrayt* injectNFreeSmallIntSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4119,9 +5493,6 @@ internal smallArrayt* injectNFreeSmallJsonSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4131,9 +5502,6 @@ internal smallArrayt* injectNFreeSmallStringSmallArray(smallArrayt *self, intmax
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4143,9 +5511,6 @@ internal smallArrayt* injectNFreeSmallContainerSmallArray(smallArrayt *self, int
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -4844,18 +6209,35 @@ baset* getAtSmallArray(smallArrayt *self, intmax_t index) {
index = lenSmallArray(self) + index;
}
- baset *r = toBaset(sArrayGetTiny(self->a, index));
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+
+ baset *r = toBaset(o);
return(r);
}
internal undefinedt* getAtUndefinedSmallArray(smallArrayt *self, intmax_t index) {
- undefinedt *e = (undefinedt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
return(NULL);
}
- return(e);
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
}
internal bool getAtBoolSmallArray(smallArrayt *self, intmax_t index) {
@@ -4864,10 +6246,6 @@ internal bool getAtBoolSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallBoolSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(false);
- }
r = e->f->get(e);
finishO(e);
}
@@ -4880,10 +6258,6 @@ internal bool* getAtBoolPSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallBoolSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -4896,10 +6270,6 @@ internal double getAtDoubleSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallDoubleSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -4912,10 +6282,6 @@ internal double* getAtDoublePSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallDoubleSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -4928,10 +6294,6 @@ internal int64_t getAtIntSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -4944,10 +6306,6 @@ internal int64_t* getAtIntPSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -4960,10 +6318,6 @@ internal int32_t getAtInt32SmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
finishO(e);
}
@@ -4976,10 +6330,6 @@ internal int32_t* getAtInt32PSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (int32_t *)e->f->getP(e);
finishO(e);
}
@@ -4992,10 +6342,6 @@ internal uint64_t getAtUintSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
finishO(e);
}
@@ -5008,10 +6354,6 @@ internal uint64_t* getAtUintPSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint64_t *)e->f->getP(e);
finishO(e);
}
@@ -5024,10 +6366,6 @@ internal uint32_t getAtUint32SmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
finishO(e);
}
@@ -5040,10 +6378,6 @@ internal uint32_t* getAtUint32PSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint32_t *)e->f->getP(e);
finishO(e);
}
@@ -5056,10 +6390,6 @@ internal char* getAtSSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallStringSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -5068,70 +6398,160 @@ internal char* getAtSSmallArray(smallArrayt *self, intmax_t index) {
internal smallDictt* getAtDictSmallArray(smallArrayt *self, intmax_t index) {
- smallDictt *e = (smallDictt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+ return((smallDictt*) toBaset(o));
}
internal smallArrayt* getAtArraySmallArray(smallArrayt *self, intmax_t index) {
- smallArrayt *e = (smallArrayt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
return(NULL);
}
- return(e);
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+ return((smallArrayt*) toBaset(o));
}
internal smallBoolt* getAtSmallBoolSmallArray(smallArrayt *self, intmax_t index) {
- smallBoolt *e = (smallBoolt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+ return((smallBoolt*) toBaset(o));
}
internal smallBytest* getAtSmallBytesSmallArray(smallArrayt *self, intmax_t index) {
- smallBytest *e = (smallBytest*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BYTES) {
return(NULL);
}
- return(e);
+ return((smallBytest*) toBaset(o));
}
internal smallDoublet* getAtSmallDoubleSmallArray(smallArrayt *self, intmax_t index) {
- smallDoublet *e = (smallDoublet*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*) toBaset(o));
}
internal smallIntt* getAtSmallIntSmallArray(smallArrayt *self, intmax_t index) {
- smallIntt *e = (smallIntt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != INT) {
return(NULL);
}
- return(e);
+ return((smallIntt*) toBaset(o));
}
internal smallJsont* getAtSmallJsonSmallArray(smallArrayt *self, intmax_t index) {
- baset *e = getAtSmallArray(self, index);
- if (!e) {
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
return(NULL);
}
+ baset *e = toBaset(o);
+
createAllocateSmallJson(r);
setTopNFreeO(r, e);
return(r);
@@ -5139,12 +6559,24 @@ internal smallJsont* getAtSmallJsonSmallArray(smallArrayt *self, intmax_t index)
internal smallStringt* getAtSmallStringSmallArray(smallArrayt *self, intmax_t index) {
- smallStringt *e = (smallStringt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*) toBaset(o));
}
internal void* getAtVoidSmallArray(smallArrayt *self, intmax_t index) {
@@ -5153,10 +6585,6 @@ internal void* getAtVoidSmallArray(smallArrayt *self, intmax_t index) {
e = getAtSmallContainerSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -5165,12 +6593,30 @@ internal void* getAtVoidSmallArray(smallArrayt *self, intmax_t index) {
internal smallContainert* getAtSmallContainerSmallArray(smallArrayt *self, intmax_t index) {
- smallContainert *e = (smallContainert*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- finishO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);;
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ return((smallContainert*) toBaset(o));
}
baset* getAtNDupSmallArray(smallArrayt *self, intmax_t index) {
@@ -5185,18 +6631,37 @@ baset* getAtNDupSmallArray(smallArrayt *self, intmax_t index) {
index = lenSmallArray(self) + index;
}
- baset *r = toBaset(sDuplicate(sArrayGetTiny(self->a, index)));
- return(r);
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ baset *b = ((sContainert*)o)->data;
+ return(duplicateO(b));
+ }
+ return(toBaset(sDuplicate(o)));
}
internal undefinedt* getAtNDupUndefinedSmallArray(smallArrayt *self, intmax_t index) {
- undefinedt *e = (undefinedt*)getAtSmallArray(self, index);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
return(NULL);
}
- return(e);
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
}
internal bool getAtNDupBoolSmallArray(smallArrayt *self, intmax_t index) {
@@ -5205,10 +6670,6 @@ internal bool getAtNDupBoolSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallBoolSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5221,10 +6682,6 @@ internal double getAtNDupDoubleSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallDoubleSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5237,10 +6694,6 @@ internal int64_t getAtNDupIntSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5253,10 +6706,6 @@ internal int32_t getAtNDupInt32SmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -5269,10 +6718,6 @@ internal uint64_t getAtNDupUintSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -5285,10 +6730,6 @@ internal uint32_t getAtNDupUint32SmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallIntSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -5301,10 +6742,6 @@ internal char* getAtNDupSSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallStringSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -5313,70 +6750,158 @@ internal char* getAtNDupSSmallArray(smallArrayt *self, intmax_t index) {
internal smallDictt* getAtNDupDictSmallArray(smallArrayt *self, intmax_t index) {
- smallDictt *e = (smallDictt*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
return(NULL);
}
- return(e);
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ return((smallDictt*)toBaset(sDuplicate(o)));
}
internal smallArrayt* getAtNDupArraySmallArray(smallArrayt *self, intmax_t index) {
- smallArrayt *e = (smallArrayt*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+ return((smallArrayt*)toBaset(sDuplicate(o)));
}
internal smallBoolt* getAtNDupSmallBoolSmallArray(smallArrayt *self, intmax_t index) {
- smallBoolt *e = (smallBoolt*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+ return((smallBoolt*)toBaset(sDuplicate(o)));
}
internal smallBytest* getAtNDupSmallBytesSmallArray(smallArrayt *self, intmax_t index) {
- smallBytest *e = (smallBytest*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*)toBaset(sDuplicate(o)));
}
internal smallDoublet* getAtNDupSmallDoubleSmallArray(smallArrayt *self, intmax_t index) {
- smallDoublet *e = (smallDoublet*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*)toBaset(sDuplicate(o)));
}
internal smallIntt* getAtNDupSmallIntSmallArray(smallArrayt *self, intmax_t index) {
- smallIntt *e = (smallIntt*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != INT) {
+ return(NULL);
+ }
+ return((smallIntt*)toBaset(sDuplicate(o)));
}
internal smallJsont* getAtNDupSmallJsonSmallArray(smallArrayt *self, intmax_t index) {
- baset *e = getAtNDupSmallArray(self, index);
- if (!e) {
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
return(NULL);
}
+
+ baset *e = toBaset(sDuplicate(o));
+
createAllocateSmallJson(r);
setTopNFreeO(r, e);
return(r);
@@ -5384,12 +6909,24 @@ internal smallJsont* getAtNDupSmallJsonSmallArray(smallArrayt *self, intmax_t in
internal smallStringt* getAtNDupSmallStringSmallArray(smallArrayt *self, intmax_t index) {
- smallStringt *e = (smallStringt*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*)toBaset(sDuplicate(o)));
}
internal void* getAtNDupVoidSmallArray(smallArrayt *self, intmax_t index) {
@@ -5398,10 +6935,6 @@ internal void* getAtNDupVoidSmallArray(smallArrayt *self, intmax_t index) {
e = getAtNDupSmallContainerSmallArray(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -5410,16 +6943,38 @@ internal void* getAtNDupVoidSmallArray(smallArrayt *self, intmax_t index) {
internal smallContainert* getAtNDupSmallContainerSmallArray(smallArrayt *self, intmax_t index) {
- smallContainert *e = (smallContainert*)getAtNDupSmallArray(self, index);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->a, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
return(NULL);
}
- return(e);
+ smallContainert *e = (smallContainert*)toBaset(o);
+ smallContainert *r = duplicateO(e);
+ finishO(e);
+ return(r);
}
internal smallArrayt* setAtSmallArray(smallArrayt *self, intmax_t index, baset *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (index >= (intmax_t)lenSmallArray(self)) {
return(NULL);
}
@@ -5534,6 +7089,10 @@ internal smallArrayt* setAtCharSmallArray(smallArrayt *self, intmax_t index, cha
internal smallArrayt* setAtDictSmallArray(smallArrayt *self, intmax_t index, smallDictt *dict) {
+ if (!dict) {
+ return(NULL);
+ }
+
if (checkObjectTypes && dict && !isOSmallDict(dict)) {
return(NULL);
}
@@ -5548,11 +7107,6 @@ internal smallArrayt* setAtDictSmallArray(smallArrayt *self, intmax_t index, sma
index = lenSmallArray(self) + index;
}
- if (!dict) {
- sArraySetTiny(self->a, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -5564,6 +7118,10 @@ internal smallArrayt* setAtDictSmallArray(smallArrayt *self, intmax_t index, sma
internal smallArrayt* setAtArraySmallArray(smallArrayt *self, intmax_t index, smallArrayt *array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (checkObjectTypes && array && !isOSmallArray(array)) {
return(NULL);
}
@@ -5578,11 +7136,6 @@ internal smallArrayt* setAtArraySmallArray(smallArrayt *self, intmax_t index, sm
index = lenSmallArray(self) + index;
}
- if (!array) {
- sArraySetTiny(self->a, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -5594,6 +7147,10 @@ internal smallArrayt* setAtArraySmallArray(smallArrayt *self, intmax_t index, sm
internal smallArrayt* setAtArraycSmallArray(smallArrayt *self, intmax_t index, char **array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (index >= (intmax_t)lenSmallArray(self)) {
return(NULL);
}
@@ -5604,11 +7161,6 @@ internal smallArrayt* setAtArraycSmallArray(smallArrayt *self, intmax_t index, c
index = lenSmallArray(self) + index;
}
- if (!array) {
- sArraySetTiny(self->a, index, (smallt *)allocSArray());
- return(self);
- }
-
sArrayt *a = allocSArray();
forEachCharP(array, e) {
@@ -5622,6 +7174,10 @@ internal smallArrayt* setAtArraycSmallArray(smallArrayt *self, intmax_t index, c
internal smallArrayt* setAtSmallBoolSmallArray(smallArrayt *self, intmax_t index, smallBoolt *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallBool(value)) {
return(NULL);
}
@@ -5636,11 +7192,6 @@ internal smallArrayt* setAtSmallBoolSmallArray(smallArrayt *self, intmax_t index
index = lenSmallArray(self) + index;
}
- if (!value) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->a, index, o);
return(self);
@@ -5648,6 +7199,10 @@ internal smallArrayt* setAtSmallBoolSmallArray(smallArrayt *self, intmax_t index
internal smallArrayt* setAtSmallBytesSmallArray(smallArrayt *self, intmax_t index, smallBytest *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallBytes(value)) {
return(NULL);
}
@@ -5662,11 +7217,6 @@ internal smallArrayt* setAtSmallBytesSmallArray(smallArrayt *self, intmax_t inde
index = lenSmallArray(self) + index;
}
- if (!value) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->B;
sArraySetTiny(self->a, index, o);
return(self);
@@ -5674,6 +7224,10 @@ internal smallArrayt* setAtSmallBytesSmallArray(smallArrayt *self, intmax_t inde
internal smallArrayt* setAtSmallDoubleSmallArray(smallArrayt *self, intmax_t index, smallDoublet *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallDouble(value)) {
return(NULL);
}
@@ -5688,11 +7242,6 @@ internal smallArrayt* setAtSmallDoubleSmallArray(smallArrayt *self, intmax_t ind
index = lenSmallArray(self) + index;
}
- if (!value) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->a, index, o);
return(self);
@@ -5700,6 +7249,10 @@ internal smallArrayt* setAtSmallDoubleSmallArray(smallArrayt *self, intmax_t ind
internal smallArrayt* setAtSmallIntSmallArray(smallArrayt *self, intmax_t index, smallIntt *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallInt(value)) {
return(NULL);
}
@@ -5714,11 +7267,6 @@ internal smallArrayt* setAtSmallIntSmallArray(smallArrayt *self, intmax_t index,
index = lenSmallArray(self) + index;
}
- if (!value) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->a, index, o);
return(self);
@@ -5726,6 +7274,10 @@ internal smallArrayt* setAtSmallIntSmallArray(smallArrayt *self, intmax_t index,
internal smallArrayt* setAtSmallJsonSmallArray(smallArrayt *self, intmax_t index, smallJsont *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallJson(value)) {
return(NULL);
}
@@ -5740,11 +7292,6 @@ internal smallArrayt* setAtSmallJsonSmallArray(smallArrayt *self, intmax_t index
index = lenSmallArray(self) + index;
}
- if (!value) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = getsoO(value);
sArraySetTiny(self->a, index, o);
return(self);
@@ -5752,6 +7299,10 @@ internal smallArrayt* setAtSmallJsonSmallArray(smallArrayt *self, intmax_t index
internal smallArrayt* setAtSmallStringSmallArray(smallArrayt *self, intmax_t index, smallStringt *string) {
+ if (!string) {
+ return(NULL);
+ }
+
if (checkObjectTypes && string && !isOSmallString(string)) {
return(NULL);
}
@@ -5767,7 +7318,7 @@ internal smallArrayt* setAtSmallStringSmallArray(smallArrayt *self, intmax_t ind
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -5780,6 +7331,10 @@ internal smallArrayt* setAtSmallStringSmallArray(smallArrayt *self, intmax_t ind
internal smallArrayt* setAtSmallContainerSmallArray(smallArrayt *self, intmax_t index, smallContainert *container) {
smallt *o = NULL;
+ if (!container) {
+ return(NULL);
+ }
+
if (checkObjectTypes && container && !isOSmallContainer(container)) {
return(NULL);
}
@@ -5794,11 +7349,6 @@ internal smallArrayt* setAtSmallContainerSmallArray(smallArrayt *self, intmax_t
index = lenSmallArray(self) + index;
}
- if (!container) {
- sArraySetTiny(self->a, index, (smallt *)allocSUndefined());
- return(self);
- }
-
if (!container->data) {
o = (smallt *) allocSContainer(NULL);
}
@@ -5811,27 +7361,44 @@ internal smallArrayt* setAtSmallContainerSmallArray(smallArrayt *self, intmax_t
internal smallArrayt* setAtNFreeSmallArray(smallArrayt *self, intmax_t index, baset *value) {
- smallArrayt *r = setAtSmallArray(self, index, value);
- if (r) {
- finishO(value);
+ if (!value) {
+ return(NULL);
}
- else {
- terminateO(value);
+
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
+
+ smallt *o = toSmallt(value);
+ sArraySetTiny(self->a, index, o);
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
}
return(self);
}
internal smallArrayt* setAtNFreeUndefinedSmallArray(smallArrayt *self, intmax_t index, undefinedt *undefined) {
- setAtUndefinedSmallArray(self, index);
- terminateO(undefined);
+ smallArrayt *r = setAtUndefinedSmallArray(self, index);
+ if (r) {
+ terminateO(undefined);
+ }
return(self);
}
internal smallArrayt* setAtNFreeSSmallArray(smallArrayt *self, intmax_t index, char *string) {
- setAtSSmallArray(self, index, string);
- free(string);
+ smallArrayt *r = setAtSSmallArray(self, index, string);
+ if (r) {
+ free(string);
+ }
return(self);
}
@@ -5841,9 +7408,6 @@ internal smallArrayt* setAtNFreeDictSmallArray(smallArrayt *self, intmax_t index
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -5853,16 +7417,15 @@ internal smallArrayt* setAtNFreeArraySmallArray(smallArrayt *self, intmax_t inde
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallArrayt* setAtNFreeArraycSmallArray(smallArrayt *self, intmax_t index, char **array) {
- setAtArraycSmallArray(self, index, array);
- listFreeS(array);
+ smallArrayt *r = setAtArraycSmallArray(self, index, array);
+ if (r) {
+ listFreeS(array);
+ }
return(self);
}
@@ -5872,9 +7435,6 @@ internal smallArrayt* setAtNFreeSmallBoolSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5884,9 +7444,6 @@ internal smallArrayt* setAtNFreeSmallBytesSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5896,9 +7453,6 @@ internal smallArrayt* setAtNFreeSmallDoubleSmallArray(smallArrayt *self, intmax_
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5908,9 +7462,6 @@ internal smallArrayt* setAtNFreeSmallIntSmallArray(smallArrayt *self, intmax_t i
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5920,9 +7471,6 @@ internal smallArrayt* setAtNFreeSmallJsonSmallArray(smallArrayt *self, intmax_t
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5932,9 +7480,6 @@ internal smallArrayt* setAtNFreeSmallStringSmallArray(smallArrayt *self, intmax_
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -5944,15 +7489,16 @@ internal smallArrayt* setAtNFreeSmallContainerSmallArray(smallArrayt *self, intm
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
internal smallArrayt* setPAtDictSmallArray(smallArrayt *self, intmax_t index, smallDictt *dict) {
+ if (!dict) {
+ return(NULL);
+ }
+
if (checkObjectTypes && dict && !isOSmallDict(dict)) {
return(NULL);
}
@@ -5967,11 +7513,6 @@ internal smallArrayt* setPAtDictSmallArray(smallArrayt *self, intmax_t index, sm
index = lenSmallArray(self) + index;
}
- if (!dict) {
- sArraySetP(self->a, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -5982,6 +7523,10 @@ internal smallArrayt* setPAtDictSmallArray(smallArrayt *self, intmax_t index, sm
internal smallArrayt* setPAtArraySmallArray(smallArrayt *self, intmax_t index, smallArrayt *array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (checkObjectTypes && array && !isOSmallArray(array)) {
return(NULL);
}
@@ -5996,11 +7541,6 @@ internal smallArrayt* setPAtArraySmallArray(smallArrayt *self, intmax_t index, s
index = lenSmallArray(self) + index;
}
- if (!array) {
- sArraySetP(self->a, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -6012,6 +7552,10 @@ internal smallArrayt* setPAtArraySmallArray(smallArrayt *self, intmax_t index, s
internal smallArrayt* setPAtSmallJsonSmallArray(smallArrayt *self, intmax_t index, smallJsont *json) {
+ if (!json) {
+ return(NULL);
+ }
+
if (checkObjectTypes && json && !isOSmallJson(json)) {
return(NULL);
}
@@ -6027,21 +7571,20 @@ internal smallArrayt* setPAtSmallJsonSmallArray(smallArrayt *self, intmax_t inde
}
smallt *o;
- if (!json) {
+ o = getsoO(json);
+ if (!o) {
o = (smallt *) allocSUndefined();
}
- else {
- o = getsoO(json);
- if (!o) {
- o = (smallt *) allocSUndefined();
- }
- }
sArraySetP(self->a, index, o);
return(self);
}
internal smallArrayt* setPAtSmallStringSmallArray(smallArrayt *self, intmax_t index, smallStringt *string) {
+ if (!string) {
+ return(NULL);
+ }
+
if (checkObjectTypes && string && !isOSmallString(string)) {
return(NULL);
}
@@ -6057,7 +7600,7 @@ internal smallArrayt* setPAtSmallStringSmallArray(smallArrayt *self, intmax_t in
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -6069,6 +7612,10 @@ internal smallArrayt* setPAtSmallStringSmallArray(smallArrayt *self, intmax_t in
internal smallArrayt* setPAtNFreeDictSmallArray(smallArrayt *self, intmax_t index, smallDictt *dict) {
+ if (!dict) {
+ return(NULL);
+ }
+
if (checkObjectTypes && dict && !isOSmallDict(dict)) {
return(NULL);
}
@@ -6083,11 +7630,6 @@ internal smallArrayt* setPAtNFreeDictSmallArray(smallArrayt *self, intmax_t inde
index = lenSmallArray(self) + index;
}
- if (!dict) {
- sArraySetP(self->a, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -6100,6 +7642,10 @@ internal smallArrayt* setPAtNFreeDictSmallArray(smallArrayt *self, intmax_t inde
internal smallArrayt* setPAtNFreeArraySmallArray(smallArrayt *self, intmax_t index, smallArrayt *array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (checkObjectTypes && array && !isOSmallArray(array)) {
return(NULL);
}
@@ -6114,11 +7660,6 @@ internal smallArrayt* setPAtNFreeArraySmallArray(smallArrayt *self, intmax_t ind
index = lenSmallArray(self) + index;
}
- if (!array) {
- sArraySetP(self->a, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -6131,6 +7672,10 @@ internal smallArrayt* setPAtNFreeArraySmallArray(smallArrayt *self, intmax_t ind
internal smallArrayt* setPAtNFreeSmallJsonSmallArray(smallArrayt *self, intmax_t index, smallJsont *json) {
+ if (!json) {
+ return(NULL);
+ }
+
if (checkObjectTypes && json && !isOSmallJson(json)) {
return(NULL);
}
@@ -6146,22 +7691,21 @@ internal smallArrayt* setPAtNFreeSmallJsonSmallArray(smallArrayt *self, intmax_t
}
smallt *o;
- if (!json) {
+ o = getsoO(json);;
+ if (!o) {
o = (smallt *) allocSUndefined();
}
- else {
- o = getsoO(json);;
- if (!o) {
- o = (smallt *) allocSUndefined();
- }
- finishO(json);
- }
+ finishO(json);
sArraySetP(self->a, index, o);
return(self);
}
internal smallArrayt* setPAtNFreeSmallStringSmallArray(smallArrayt *self, intmax_t index, smallStringt *string) {
+ if (!string) {
+ return(NULL);
+ }
+
if (checkObjectTypes && string && !isOSmallString(string)) {
return(NULL);
}
@@ -6177,7 +7721,7 @@ internal smallArrayt* setPAtNFreeSmallStringSmallArray(smallArrayt *self, intmax
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -6190,12 +7734,26 @@ internal smallArrayt* setPAtNFreeSmallStringSmallArray(smallArrayt *self, intmax
internal double getNumSmallArray(smallArrayt *self, intmax_t index) {
- baset *o = getAtSmallArray(self, index);
+ if (index >= (intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallArray(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallArray(self) + index;
+ }
- if (!o) {
+ smallt *e = sArrayGetTiny(self->a, index);
+ if (!e) {
+ return(0);
+ }
+ if (e->type != INT && e->type != DOUBLE) {
return(0);
}
+ baset *o = toBaset(e);
+
double r = 0;
if (isOSmallDouble(o)) {
r = getValO((smallDoublet*)o);
@@ -8329,11 +9887,19 @@ internal baset* iterStartSmallArray(smallArrayt *self) {
// get first element
self->iterIndex = 0;
self->iterStep = 1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = getAtSmallArray(self, 0);
+ // TODO find first non NULL element, deleted element can be at index 0
+ smallt *o = sArrayGetTiny(self->a, 0);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -8348,11 +9914,18 @@ internal baset* iterStartLastSmallArray(smallArrayt *self) {
// get first element
self->iterIndex = (ssize_t)lenSmallArray(self) - 1;
self->iterStep = -1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = getAtSmallArray(self, self->iterIndex);
+ smallt *o = sArrayGetTiny(self->a, self->iterIndex);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -8377,11 +9950,18 @@ internal baset* iterStartFromSmallArray(smallArrayt *self, intmax_t index) {
// get first element
self->iterIndex = index;
self->iterStep = 1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = getAtSmallArray(self, self->iterIndex);
+ smallt *o = sArrayGetTiny(self->a, 0);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -8411,11 +9991,18 @@ internal baset* iterStartFromStepSmallArray(smallArrayt *self, intmax_t index, i
// get first element
self->iterIndex = index;
self->iterStep = step;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = getAtSmallArray(self, self->iterIndex);
+ smallt *o = sArrayGetTiny(self->a, self->iterIndex);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -8426,7 +10013,9 @@ internal baset* iterNextSmallArray(smallArrayt *self) {
return(NULL);
}
// free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
// get next element until we get a valid item or the end is reached
while (!self->iterElement) {
// get next element
@@ -8436,7 +10025,17 @@ internal baset* iterNextSmallArray(smallArrayt *self) {
self->iterIndex = -1;
return(NULL);
}
- self->iterElement = getAtSmallArray(self, self->iterIndex);
+ smallt *o = sArrayGetTiny(self->a, self->iterIndex);
+ if (!o) {
+ continue;
+ }
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
}
return(self->iterElement);
}
@@ -10358,6 +11957,106 @@ smallArrayt* sliceSmallArrayG(smallArrayt *self, intmax_t start, intmax
return(self->f->slice(self, start, end));
}
+smallArrayt* cropSmallArrayG (smallArrayt *self, intmax_t start, intmax_t end) {
+
+ return(self->f->crop(self, start, end));
+}
+
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElem(self, index));
+}
+
+undefinedt* cropElemUndefinedSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemUndefined(self, index));
+}
+
+bool cropElemBoolSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemBool(self, index));
+}
+
+double cropElemDoubleSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemDouble(self, index));
+}
+
+int64_t cropElemIntSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemInt(self, index));
+}
+
+int32_t cropElemInt32SmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemInt32(self, index));
+}
+
+uint64_t cropElemUintSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemUint(self, index));
+}
+
+uint32_t cropElemUint32SmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemUint32(self, index));
+}
+
+char* cropElemSSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemS(self, index));
+}
+
+smallDictt* cropElemDictSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemDict(self, index));
+}
+
+smallArrayt* cropElemArraySmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemArray(self, index));
+}
+
+smallBoolt* cropElemSmallBoolSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallBool(self, index));
+}
+
+smallBytest* cropElemSmallBytesSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallBytes(self, index));
+}
+
+smallDoublet* cropElemSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallDouble(self, index));
+}
+
+smallIntt* cropElemSmallIntSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallInt(self, index));
+}
+
+smallJsont* cropElemSmallJsonSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallJson(self, index));
+}
+
+smallStringt* cropElemSmallStringSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallString(self, index));
+}
+
+void* cropElemVoidSmallArrayG (smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemVoid(self, index));
+}
+
+smallContainert* cropElemSmallContainerSmallArrayG(smallArrayt *self, intmax_t index) {
+
+ return(self->f->cropElemSmallContainer(self, index));
+}
+
smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end) {
return(self->f->copy(self, start, end));
@@ -11239,6 +12938,11 @@ bool writeStreamSmallArrayG (smallArrayt *self, FILE *fp) {
return(self->f->writeStream(self, fp));
}
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath) {
+
+ return(self->f->appendText(self,filePath));
+}
+
bool appendTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath) {
return(self->f->appendTextSmallString(self,filePath));
diff --git a/src/json/libsheepyCSmallArray.h b/src/json/libsheepyCSmallArray.h
@@ -135,11 +135,14 @@ typedef smallArrayt* (*fromArrayNFreeSmallArrayFt)(smallArrayt *self,
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value: object to push
* \return
- * 0 success
- * -1 error
+ * self success
+ * NULL error
*/
typedef smallArrayt* (*pushSmallArrayFt) (smallArrayt *self, baset *value);
typedef smallArrayt* (*pushUndefinedSmallArrayFt) (smallArrayt *self);
@@ -272,6 +275,9 @@ typedef double (*popNumSmallArrayFt) (smallArrayt *self);
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* value string to prepend
* \return
@@ -441,6 +447,62 @@ typedef smallArrayt* (*addSmallArrayFt) (smallArrayt *self, small
typedef smallArrayt* (*sliceSmallArrayFt) (smallArrayt *self, intmax_t start, intmax_t end);
/**
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
+ *
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallArrayt* (*cropSmallArrayFt) (smallArrayt *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
+ */
+typedef baset* (*cropElemSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef undefinedt* (*cropElemUndefinedSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef bool (*cropElemBoolSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef double (*cropElemDoubleSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef int64_t (*cropElemIntSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef int32_t (*cropElemInt32SmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef uint64_t (*cropElemUintSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef uint32_t (*cropElemUint32SmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef char* (*cropElemSSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallDictt* (*cropElemDictSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallArrayt* (*cropElemArraySmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallBoolt* (*cropElemSmallBoolSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallBytest* (*cropElemSmallBytesSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallDoublet* (*cropElemSmallDoubleSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallIntt* (*cropElemSmallIntSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallJsont* (*cropElemSmallJsonSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallStringt* (*cropElemSmallStringSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef void* (*cropElemVoidSmallArrayFt) (smallArrayt *self, intmax_t index);
+typedef smallContainert* (*cropElemSmallContainerSmallArrayFt) (smallArrayt *self, intmax_t index);
+
+/**
* keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
@@ -725,6 +787,9 @@ typedef smallContainert* (*getAtNDupSmallContainerSmallArrayFt)(smallArrayt *sel
* The object is duplicated for:
* char *
*
+ * When self is an array which is an element of a smallArray, smallDict, the setP function in
+ * the parent object has to be called to update the sObject pointer (which is inside self).
+ *
* \param
* index: index in array, must be inside the array
* string
@@ -1422,6 +1487,26 @@ typedef bool (*areAllEBytesSmallArrayFt) (smallArrayt *self);
shiftNSmashSmallJsonSmallArrayFt shiftNSmashSmallJson;\
addSmallArrayFt add;\
sliceSmallArrayFt slice;\
+ cropSmallArrayFt crop;\
+ cropElemSmallArrayFt cropElem;\
+ cropElemUndefinedSmallArrayFt cropElemUndefined;\
+ cropElemBoolSmallArrayFt cropElemBool;\
+ cropElemDoubleSmallArrayFt cropElemDouble;\
+ cropElemIntSmallArrayFt cropElemInt;\
+ cropElemInt32SmallArrayFt cropElemInt32;\
+ cropElemUintSmallArrayFt cropElemUint;\
+ cropElemUint32SmallArrayFt cropElemUint32;\
+ cropElemSSmallArrayFt cropElemS;\
+ cropElemDictSmallArrayFt cropElemDict;\
+ cropElemArraySmallArrayFt cropElemArray;\
+ cropElemSmallBoolSmallArrayFt cropElemSmallBool;\
+ cropElemSmallBytesSmallArrayFt cropElemSmallBytes;\
+ cropElemSmallDoubleSmallArrayFt cropElemSmallDouble;\
+ cropElemSmallIntSmallArrayFt cropElemSmallInt;\
+ cropElemSmallJsonSmallArrayFt cropElemSmallJson;\
+ cropElemSmallStringSmallArrayFt cropElemSmallString;\
+ cropElemVoidSmallArrayFt cropElemVoid;\
+ cropElemSmallContainerSmallArrayFt cropElemSmallContainer;\
copySmallArrayFt copy;\
insertSmallArrayFt insert;\
insertSmallJsonSmallArrayFt insertSmallJson;\
@@ -1731,6 +1816,12 @@ struct smallArray {
ssize_t iterIndex;
intmax_t iterStep;
baset* iterElement;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
};
// smallArray
@@ -1987,6 +2078,26 @@ smallArrayt* shiftNSmashSmallJsonSmallArrayG (smallArrayt *self, smallJsont *jso
smallArrayt* addSmallArrayG (smallArrayt *self, smallArrayt *array);
smallArrayt* sliceSmallArrayG(smallArrayt *self, intmax_t start, intmax_t end);
+smallArrayt* cropSmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
+baset* cropElemSmallArrayG (smallArrayt *self, intmax_t index);
+undefinedt* cropElemUndefinedSmallArrayG (smallArrayt *self, intmax_t index);
+bool cropElemBoolSmallArrayG (smallArrayt *self, intmax_t index);
+double cropElemDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+int64_t cropElemIntSmallArrayG (smallArrayt *self, intmax_t index);
+int32_t cropElemInt32SmallArrayG (smallArrayt *self, intmax_t index);
+uint64_t cropElemUintSmallArrayG (smallArrayt *self, intmax_t index);
+uint32_t cropElemUint32SmallArrayG (smallArrayt *self, intmax_t index);
+char* cropElemSSmallArrayG (smallArrayt *self, intmax_t index);
+smallDictt* cropElemDictSmallArrayG (smallArrayt *self, intmax_t index);
+smallArrayt* cropElemArraySmallArrayG (smallArrayt *self, intmax_t index);
+smallBoolt* cropElemSmallBoolSmallArrayG (smallArrayt *self, intmax_t index);
+smallBytest* cropElemSmallBytesSmallArrayG (smallArrayt *self, intmax_t index);
+smallDoublet* cropElemSmallDoubleSmallArrayG (smallArrayt *self, intmax_t index);
+smallIntt* cropElemSmallIntSmallArrayG (smallArrayt *self, intmax_t index);
+smallJsont* cropElemSmallJsonSmallArrayG (smallArrayt *self, intmax_t index);
+smallStringt* cropElemSmallStringSmallArrayG (smallArrayt *self, intmax_t index);
+void* cropElemVoidSmallArrayG (smallArrayt *self, intmax_t index);
+smallContainert* cropElemSmallContainerSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* copySmallArrayG (smallArrayt *self, intmax_t start, intmax_t end);
smallArrayt* insertSmallArrayG (smallArrayt *self, intmax_t index, smallArrayt *toInsert);
smallArrayt* insertSmallJsonSmallArrayG (smallArrayt *self, intmax_t index, smallJsont *toInsert);
@@ -2164,6 +2275,7 @@ bool writeTextSmallArrayG (smallArrayt *self, const char *filePath);
bool writeTextSmallJsonSmallArrayG (smallArrayt *self, smallJsont *filePath);
bool writeTextSmallStringSmallArrayG (smallArrayt *self, smallStringt *filePath);
bool writeStreamSmallArrayG (smallArrayt *self, FILE *fp);
+bool appendTextSmallArrayG(smallArrayt *self, const char *filePath);
bool appendTextSmallStringSmallArrayG(smallArrayt *self, smallStringt *filePath);
smallStringt* typeSmallStringSmallArrayG(smallArrayt *self, intmax_t index);
smallArrayt* typeSmallStringsSmallArrayG(smallArrayt *self);
diff --git a/src/json/libsheepyCSmallContainer.c b/src/json/libsheepyCSmallContainer.c
@@ -27,7 +27,6 @@
#define internal static
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
#include <stdio.h>
@@ -60,8 +59,6 @@ smallContainert* duplicateSmallContainerG (smallContainert *self);
void* getSmallContainerG(smallContainert *self, void* retType UNUSED, intmax_t index UNUSED);
smallContainert* setSmallContainerG(smallContainert *self, void *data);
-enum {DEALLOCATE_WITH_FREE, DEALLOCATE_WITH_DISPOSE};
-
void initiateSmallContainer(smallContainert *self) {
self->type = "smallContainer";
@@ -141,7 +138,11 @@ smallContainert* allocSmallContainer(void *data) {
internal void freeSmallContainer(smallContainert *self) {
if (self->data) {
- if (self->dataFree) {
+ // free with sContainert free function
+ if (self->data->free) {
+ self->data->free(self->data->data);
+ }
+ else if (self->dataFree) {
self->dataFree(self->data->data);
}
else if (self->f->dataFree) {
@@ -224,8 +225,9 @@ internal smallContainert* duplicateSmallContainer(smallContainert *self) {
}
else if (self->f->dataDuplicate) {
dup->data->data = self->f->dataDuplicate(self->data->data);
- }
}
+ dup->data->free = self->data->free;
+ }
dup->dataFree = self->dataFree;
dup->dataToString = self->dataToString;
dup->dataDuplicate = self->dataDuplicate;
@@ -235,12 +237,18 @@ internal smallContainert* duplicateSmallContainer(smallContainert *self) {
internal smallContainert* setClassDataFreeSmallContainer(smallContainert *self, dataFreeSmallContainerFt free) {
self->f->dataFree = free;
+ if (self->data) {
+ self->data->free = (freeSContainerFt)free;;
+ }
return(self);
}
internal smallContainert* setObjectDataFreeSmallContainer(smallContainert *self, dataFreeSmallContainerFt free) {
self->dataFree = free;
+ if (self->data) {
+ self->data->free = (freeSContainerFt)free;;
+ }
return(self);
}
@@ -279,7 +287,7 @@ internal void smashSmallContainer(smallContainert **self) {
internal void* getSmallContainer(smallContainert *self) {
if (!self->data) {
- return(false);
+ return(NULL);
}
return(self->data->data);
}
diff --git a/src/json/libsheepyCSmallContainer.h b/src/json/libsheepyCSmallContainer.h
@@ -34,17 +34,17 @@ typedef struct smallContainer smallContainert;
// for object inheriting smallContainer, cast to smallContainer to be able to use this class functions and generics
#define cCo(self) ( (smallContainert*) self )
-typedef void (*freeSmallContainerFt) (smallContainert *self);
-typedef void (*terminateSmallContainerFt) (smallContainert **self);
-typedef char* (*toStringSmallContainerFt) (smallContainert *self);
+typedef void (*freeSmallContainerFt) (smallContainert *self);
+typedef void (*terminateSmallContainerFt) (smallContainert **self);
+typedef char* (*toStringSmallContainerFt) (smallContainert *self);
typedef smallContainert* (*duplicateSmallContainerFt) (smallContainert *self);
/**
* free container
*/
-typedef void (*finishSmallContainerFt) (smallContainert **self);
+typedef void (*finishSmallContainerFt) (smallContainert **self);
-typedef const char* (*helpSmallContainerFt) (smallContainert *self);
+typedef const char* (*helpSmallContainerFt) (smallContainert *self);
// smallContainer functions
/**
@@ -53,7 +53,7 @@ typedef const char* (*helpSmallContainerFt) (smallContainert *self);
* \param
* data pointer to buffer in container
*/
-typedef void (*dataFreeSmallContainerFt) (void *data);
+typedef void (*dataFreeSmallContainerFt) (void *data);
/**
* set function to free container data in the class
@@ -63,7 +63,7 @@ typedef void (*dataFreeSmallContainerFt) (void *data);
* \param
* free user provided function to free the data in the container
*/
-typedef smallContainert* (*setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
+typedef smallContainert* (*setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
/**
* set function to free container data in self
@@ -71,7 +71,7 @@ typedef smallContainert* (*setClassDataFreeSmallContainerFt) (small
* \param
* free user provided function to free the data in the container
*/
-typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
+typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free);
/**
* prototype for user provided toString function
@@ -79,7 +79,7 @@ typedef smallContainert* (*setObjectDataFreeSmallContainerFt) (small
* \param
* data pointer to buffer in container
*/
-typedef char* (*dataToStringSmallContainerFt) (void *data);
+typedef char* (*dataToStringSmallContainerFt) (void *data);
/**
* set function to stringify container data in the class
@@ -87,7 +87,7 @@ typedef char* (*dataToStringSmallContainerFt) (void *data);
* \param
* toString user provided function to stringify the data in the container
*/
-typedef smallContainert* (*setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
+typedef smallContainert* (*setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
/**
* set function to stringify container data in self
@@ -95,7 +95,7 @@ typedef smallContainert* (*setClassDataToStringSmallContainerFt) (small
* \param
* toString user provided function to stringify the data in the container
*/
-typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
+typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString);
/**
* prototype for user provided duplicate function
@@ -103,7 +103,7 @@ typedef smallContainert* (*setObjectDataToStringSmallContainerFt) (small
* \param
* data pointer to buffer in container
*/
-typedef void* (*dataDuplicateSmallContainerFt) (void *data);
+typedef void* (*dataDuplicateSmallContainerFt) (void *data);
/**
* set function to duplicate container data in the class
@@ -111,7 +111,7 @@ typedef void* (*dataDuplicateSmallContainerFt) (void *data);
* \param
* duplicate user provided function to duplicate the data in the container
*/
-typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
/**
* set function to duplicate container data in self
@@ -119,12 +119,12 @@ typedef smallContainert* (*setClassDataDuplicateSmallContainerFt) (small
* \param
* duplicate user provided function to duplicate the data in the container
*/
-typedef smallContainert* (*setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
+typedef smallContainert* (*setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate);
/**
* free self but not the data inside
*/
-typedef void (*smashSmallContainerFt) (smallContainert **self);
+typedef void (*smashSmallContainerFt) (smallContainert **self);
/**
* get a copy of smallContainer
@@ -134,7 +134,7 @@ typedef void (*smashSmallContainerFt) (smallContainert *
* \return
* char*
*/
-typedef void* (*getSmallContainerFt) (smallContainert *self);
+typedef void* (*getSmallContainerFt) (smallContainert *self);
/**
* set smallContainer
@@ -142,7 +142,7 @@ typedef void* (*getSmallContainerFt) (smallContainert *self);
* \param
* string buffer to store in object (the buffer is duplicated)
*/
-typedef smallContainert* (*setSmallContainerFt) (smallContainert *self, void *data);
+typedef smallContainert* (*setSmallContainerFt) (smallContainert *self, void *data);
/**
* class functions
@@ -189,14 +189,14 @@ typedef struct {
* class
*/
struct smallContainer {
- const char *type;
- smallContainerFunctionst *f;
+ const char *type;
+ smallContainerFunctionst *f;
/** pointer to data in smallContainer */
- sContainert *data;
- dataFreeSmallContainerFt dataFree;
- dataToStringSmallContainerFt dataToString;
- dataDuplicateSmallContainerFt dataDuplicate;
+ sContainert *data;
+ dataFreeSmallContainerFt dataFree;
+ dataToStringSmallContainerFt dataToString;
+ dataDuplicateSmallContainerFt dataDuplicate;
};
// smallContainer
diff --git a/src/json/libsheepyCSmallDict.c b/src/json/libsheepyCSmallDict.c
@@ -220,6 +220,25 @@ internal smallStringt* getNDupSmallStringKCharSmallDict(smallDictt *self, char k
internal void* getNDupVoidKCharSmallDict(smallDictt *self, char key);
internal smallContainert* getNDupSmallContainerKCharSmallDict(smallDictt *self, char key);
internal double getNumSmallDict(smallDictt *self, const char *key);
+internal baset* cropElemSmallDict(smallDictt *self, char* key);
+internal undefinedt* cropElemUndefinedSmallDict(smallDictt *self, char* key);
+internal bool cropElemBoolSmallDict(smallDictt *self, char* key);
+internal double cropElemDoubleSmallDict(smallDictt *self, char* key);
+internal int64_t cropElemIntSmallDict(smallDictt *self, char* key);
+internal int32_t cropElemInt32SmallDict(smallDictt *self, char* key);
+internal uint64_t cropElemUintSmallDict(smallDictt *self, char* key);
+internal uint32_t cropElemUint32SmallDict(smallDictt *self, char* key);
+internal char* cropElemSSmallDict(smallDictt *self, char* key);
+internal smallDictt* cropElemDictSmallDict(smallDictt *self, char* key);
+internal smallArrayt* cropElemArraySmallDict(smallDictt *self, char* key);
+internal smallBoolt* cropElemSmallBoolSmallDict(smallDictt *self, char* key);
+internal smallBytest* cropElemSmallBytesSmallDict(smallDictt *self, char* key);
+internal smallDoublet* cropElemSmallDoubleSmallDict(smallDictt *self, char* key);
+internal smallIntt* cropElemSmallIntSmallDict(smallDictt *self, char* key);
+internal smallJsont* cropElemSmallJsonSmallDict(smallDictt *self, char* key);
+internal smallStringt* cropElemSmallStringSmallDict(smallDictt *self, char* key);
+internal void* cropElemVoidSmallDict(smallDictt *self, char* key);
+internal smallContainert* cropElemSmallContainerSmallDict(smallDictt *self, char* key);
internal smallDictt* delSmallDict(smallDictt *self, const char *key);
internal smallDictt* delKCharSmallDict(smallDictt *self, char key);
internal bool hasSmallDict(smallDictt *self, const char *key);
@@ -503,6 +522,25 @@ bool icEqualSmallDictBaseG(smallDictt* self, baset* p2);
bool icEqualSmallDictSmallJsonG(smallDictt* self, smallJsont* p2);
bool icEqualSmallDictG(smallDictt* self, smallDictt* p2);
double getNumSmallDictG(smallDictt *self, const char *key);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key);
+bool cropElemBoolSmallDictG (smallDictt *self, char* key);
+double cropElemDoubleSmallDictG (smallDictt *self, char* key);
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key);
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key);
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key);
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key);
+char* cropElemSSmallDictG (smallDictt *self, char* key);
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key);
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key);
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key);
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key);
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key);
+void* cropElemVoidSmallDictG (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key);
smallDictt* delSmallDictG (smallDictt *self, const char *key, int unused UNUSED);
smallDictt* delKCharSmallDictG (smallDictt *self, char key, int unused UNUSED);
smallDictt* delElemSmallDictG (smallDictt *self, const char *key);
@@ -577,11 +615,12 @@ void initiateSmallDict(smallDictt *self) {
smallDictF = malloc(sizeof(smallDictFunctionst));
registerMethodsSmallDict(smallDictF);
}
- self->f = smallDictF;
+ self->f = smallDictF;
- self->d = NULL;
- self->iterIndex = -1;;
- self->iterElement = NULL;;
+ self->d = NULL;
+ self->iterIndex = -1;
+ self->iterElement = NULL;
+ self->iterElementDataType = 0;
}
void registerMethodsSmallDict(smallDictFunctionst *f) {
@@ -764,6 +803,25 @@ void registerMethodsSmallDict(smallDictFunctionst *f) {
f->getNDupVoidKChar = getNDupVoidKCharSmallDict;
f->getNDupSmallContainerKChar = getNDupSmallContainerKCharSmallDict;
f->getNum = getNumSmallDict;
+ f->cropElem = cropElemSmallDict;
+ f->cropElemUndefined = cropElemUndefinedSmallDict;
+ f->cropElemBool = cropElemBoolSmallDict;
+ f->cropElemDouble = cropElemDoubleSmallDict;
+ f->cropElemInt = cropElemIntSmallDict;
+ f->cropElemInt32 = cropElemInt32SmallDict;
+ f->cropElemUint = cropElemUintSmallDict;
+ f->cropElemUint32 = cropElemUint32SmallDict;
+ f->cropElemS = cropElemSSmallDict;
+ f->cropElemDict = cropElemDictSmallDict;
+ f->cropElemArray = cropElemArraySmallDict;
+ f->cropElemSmallBool = cropElemSmallBoolSmallDict;
+ f->cropElemSmallBytes = cropElemSmallBytesSmallDict;
+ f->cropElemSmallDouble = cropElemSmallDoubleSmallDict;
+ f->cropElemSmallInt = cropElemSmallIntSmallDict;
+ f->cropElemSmallJson = cropElemSmallJsonSmallDict;
+ f->cropElemSmallString = cropElemSmallStringSmallDict;
+ f->cropElemVoid = cropElemVoidSmallDict;
+ f->cropElemSmallContainer = cropElemSmallContainerSmallDict;
f->del = delSmallDict;
f->delKChar = delKCharSmallDict;
f->has = hasSmallDict;
@@ -944,7 +1002,8 @@ internal smallDictt* duplicateSmallDict(smallDictt *self) {
}
}
- dup->iterIndex = self->iterIndex;
+ dup->iterElementDataType = self->iterElementDataType;
+ dup->iterIndex = self->iterIndex;
if (dup->iterIndex != -1) {
dup->iterKey = (&((dup->d)->elements) + dup->iterIndex)->key;
}
@@ -1020,7 +1079,9 @@ internal const char* helpSmallDict(smallDictt UNUSED *self) {
internal void resetSmallDict(smallDictt *self) {
if (self->iterIndex != -1) {
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
self->iterElement = NULL;
self->iterIndex = -1;
}
@@ -1067,11 +1128,9 @@ internal smallDictt* setSmallDict(smallDictt *self, const char *key, baset *valu
return(NULL);
}
if (!value) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
- }
- else {
- sDictSetTiny(&(self->d), key, toSmallt(value));
+ return(NULL);
}
+ sDictSetTiny(&(self->d), key, toSmallt(value));
return(self);
}
@@ -1121,18 +1180,12 @@ internal smallDictt* setIntSmallDict(smallDictt *self, const char *key, int64_t
internal smallDictt* setSSmallDict(smallDictt *self, const char *key, const char *string) {
- if (!key) {
+ if (!key || !string) {
return(NULL);
}
smallt *o;
- if (!string) {
- // set empty string when NULL
- o = (smallt *) allocSStringTiny("");
- }
- else {
- o = (smallt *) allocSStringTiny(string);
- }
+ o = (smallt *) allocSStringTiny(string);
sDictSetTiny(&(self->d), key, o);
return(self);
}
@@ -1145,19 +1198,14 @@ internal smallDictt* setCharSmallDict(smallDictt *self, const char *key, char c)
internal smallDictt* setDictSmallDict(smallDictt *self, const char *key, smallDictt *dict) {
- if (checkObjectTypes && dict && !isOSmallDict(dict)) {
+ if (!key || !dict) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && dict && !isOSmallDict(dict)) {
return(NULL);
}
- if (!dict) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();
}
@@ -1168,19 +1216,14 @@ internal smallDictt* setDictSmallDict(smallDictt *self, const char *key, smallDi
internal smallDictt* setArraySmallDict(smallDictt *self, const char *key, smallArrayt *array) {
- if (checkObjectTypes && array && !isOSmallArray(array)) {
+ if (!key || !array) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && array && !isOSmallArray(array)) {
return(NULL);
}
- if (!array) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -1192,15 +1235,10 @@ internal smallDictt* setArraySmallDict(smallDictt *self, const char *key, smallA
internal smallDictt* setArraycSmallDict(smallDictt *self, const char *key, char **array) {
- if (!key) {
+ if (!key || !array) {
return(NULL);
}
- if (!array) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSArray());
- return(self);
- }
-
sArrayt *a = allocSArray();
forEachCharP(array, e) {
@@ -1214,35 +1252,30 @@ internal smallDictt* setArraycSmallDict(smallDictt *self, const char *key, char
internal smallDictt* setSmallBoolSmallDict(smallDictt *self, const char *key, smallBoolt *value) {
- if (checkObjectTypes && value && !isOSmallBool(value)) {
+ if (!key || !value) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && value && !isOSmallBool(value)) {
return(NULL);
}
- if (!value) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
- }
- else {
- smallt *o = (smallt *) value->value;
- sDictSetTiny(&(self->d), key, o);
- }
+ smallt *o = (smallt *) value->value;
+ sDictSetTiny(&(self->d), key, o);
return(self);
}
internal smallDictt* setSmallBytesSmallDict(smallDictt *self, const char *key, smallBytest *value) {
- if (checkObjectTypes && value && !isOSmallBytes(value)) {
+ if (!key || !value) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && value && !isOSmallBytes(value)) {
return(NULL);
}
- if (!value || !value->B) {
+ if (!value->B) {
sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
}
else {
@@ -1254,76 +1287,61 @@ internal smallDictt* setSmallBytesSmallDict(smallDictt *self, const char *key, s
internal smallDictt* setSmallDoubleSmallDict(smallDictt *self, const char *key, smallDoublet *value) {
- if (checkObjectTypes && value && !isOSmallDouble(value)) {
+ if (!key || !value) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && value && !isOSmallDouble(value)) {
return(NULL);
}
- if (!value) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
- }
- else {
- smallt *o = (smallt *) value->value;
- sDictSetTiny(&(self->d), key, o);
- }
+ smallt *o = (smallt *) value->value;
+ sDictSetTiny(&(self->d), key, o);
return(self);
}
internal smallDictt* setSmallIntSmallDict(smallDictt *self, const char *key, smallIntt *value) {
- if (checkObjectTypes && value && !isOSmallInt(value)) {
+ if (!key || !value) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && value && !isOSmallInt(value)) {
return(NULL);
}
- if (!value) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
- }
- else {
- smallt *o = (smallt *) value->value;
- sDictSetTiny(&(self->d), key, o);
- }
+ smallt *o = (smallt *) value->value;
+ sDictSetTiny(&(self->d), key, o);
return(self);
}
internal smallDictt* setSmallJsonSmallDict(smallDictt *self, const char *key, smallJsont *value) {
- if (checkObjectTypes && value && !isOSmallJson(value)) {
+ if (!key || !value) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && value && !isOSmallJson(value)) {
return(NULL);
}
- if (!value) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
- }
- else {
- smallt *o = getsoO(value);
- sDictSetTiny(&(self->d), key, o);
- }
+ smallt *o = getsoO(value);
+ sDictSetTiny(&(self->d), key, o);
return(self);
}
internal smallDictt* setSmallStringSmallDict(smallDictt *self, const char *key, smallStringt *string) {
- if (checkObjectTypes && string && !isOSmallString(string)) {
+ if (!key || !string) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && string && !isOSmallString(string)) {
return(NULL);
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
// set empty string when NULL
o = (smallt *) allocSStringTiny("");
}
@@ -1337,26 +1355,21 @@ internal smallDictt* setSmallStringSmallDict(smallDictt *self, const char *key,
internal smallDictt* setSmallContainerSmallDict(smallDictt *self, const char *key, smallContainert *container) {
smallt *o = NULL;
- if (checkObjectTypes && container && !isOSmallContainer(container)) {
+ if (!key || !container) {
return(NULL);
}
- if (!key) {
+ if (checkObjectTypes && container && !isOSmallContainer(container)) {
return(NULL);
}
- if (!container) {
- sDictSetTiny(&(self->d), key, (smallt *)allocSUndefined());
+ if (!container->data) {
+ o = (smallt *) allocSContainer(NULL);
}
else {
- if (!container->data) {
- o = (smallt *) allocSContainer(NULL);
- }
- else {
- o = (smallt *) container->data;
- }
- sDictSetTiny(&(self->d), key, o);
+ o = (smallt *) container->data;
}
+ sDictSetTiny(&(self->d), key, o);
return(self);
}
@@ -1465,23 +1478,27 @@ internal smallDictt* setSmallContainerKCharSmallDict(smallDictt *self, char key,
internal smallDictt* setNFreeSmallDict(smallDictt *self, const char *key, baset *value) {
- smallDictt *r = setSmallDict(self, key, value);
- if (r) {
- finishO(value);
+ if (!key) {
+ // can't insert NULL in sDict
+ return(NULL);
}
- else {
- terminateO(value);
+ if (!value) {
+ return(NULL);
}
- return(r);
+
+ smallt *o = toSmallt(value);
+ sDictSetTiny(&(self->d), key, o);
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
+ }
+ return(self);
}
internal smallDictt* setNFreeUndefinedSmallDict(smallDictt *self, const char *key, undefinedt *undefined) {
smallDictt *r = setUndefinedSmallDict(self, key);
if (r) {
- finishO(undefined);
- }
- else {
terminateO(undefined);
}
return(r);
@@ -1489,8 +1506,10 @@ internal smallDictt* setNFreeUndefinedSmallDict(smallDictt *self, const char *ke
internal smallDictt* setNFreeSSmallDict(smallDictt *self, const char *key, char *string) {
- setSSmallDict(self, key, string);
- free(string);
+ smallDictt *r = setSSmallDict(self, key, string);;
+ if (r) {
+ free(string);
+ }
return(self);
}
@@ -1500,9 +1519,6 @@ internal smallDictt* setNFreeDictSmallDict(smallDictt *self, const char *key, sm
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -1512,16 +1528,15 @@ internal smallDictt* setNFreeArraySmallDict(smallDictt *self, const char *key, s
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallDictt* setNFreeArraycSmallDict(smallDictt *self, const char *key, char **array) {
- setArraycSmallDict(self, key, array);
- listFreeS(array);
+ smallDictt *r = setArraycSmallDict(self, key, array);;
+ if (r) {
+ listFreeS(array);
+ }
return(self);
}
@@ -1531,9 +1546,6 @@ internal smallDictt* setNFreeSmallBoolSmallDict(smallDictt *self, const char *ke
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1543,9 +1555,6 @@ internal smallDictt* setNFreeSmallBytesSmallDict(smallDictt *self, const char *k
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1555,9 +1564,6 @@ internal smallDictt* setNFreeSmallDoubleSmallDict(smallDictt *self, const char *
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1567,9 +1573,6 @@ internal smallDictt* setNFreeSmallIntSmallDict(smallDictt *self, const char *key
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1579,9 +1582,6 @@ internal smallDictt* setNFreeSmallJsonSmallDict(smallDictt *self, const char *ke
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -1591,9 +1591,6 @@ internal smallDictt* setNFreeSmallStringSmallDict(smallDictt *self, const char *
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -1603,9 +1600,6 @@ internal smallDictt* setNFreeSmallContainerSmallDict(smallDictt *self, const cha
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
@@ -1690,7 +1684,7 @@ internal smallDictt* setNFreeSmallContainerKCharSmallDict(smallDictt *self, char
internal smallDictt* setPDictSmallDict(smallDictt *self, const char *key, smallDictt *dict) {
- if (!key) {
+ if (!key || !dict) {
return(NULL);
}
@@ -1698,11 +1692,6 @@ internal smallDictt* setPDictSmallDict(smallDictt *self, const char *key, smallD
return(NULL);
}
- if (!dict) {
- sDictSetP(&(self->d), key, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -1713,7 +1702,7 @@ internal smallDictt* setPDictSmallDict(smallDictt *self, const char *key, smallD
internal smallDictt* setPArraySmallDict(smallDictt *self, const char *key, smallArrayt *array) {
- if (!key) {
+ if (!key || !array) {
return(NULL);
}
@@ -1721,11 +1710,6 @@ internal smallDictt* setPArraySmallDict(smallDictt *self, const char *key, small
return(NULL);
}
- if (!array) {
- sDictSetP(&(self->d), key, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -1737,7 +1721,7 @@ internal smallDictt* setPArraySmallDict(smallDictt *self, const char *key, small
internal smallDictt* setPSmallJsonSmallDict(smallDictt *self, const char *key, smallJsont *json) {
- if (!key) {
+ if (!key || !json) {
return(NULL);
}
@@ -1746,24 +1730,18 @@ internal smallDictt* setPSmallJsonSmallDict(smallDictt *self, const char *key, s
}
smallt *o;
- if (!json) {
+ o = getsoO(json);
+ if (!o) {
// set empty string when NULL
o = (smallt *) allocSUndefined();
}
- else {
- o = getsoO(json);
- if (!o) {
- // set empty string when NULL
- o = (smallt *) allocSUndefined();
- }
- }
sDictSetP(&(self->d), key, (smallt *)o);
return(self);
}
internal smallDictt* setPSmallStringSmallDict(smallDictt *self, const char *key, smallStringt *string) {
- if (!key) {
+ if (!key || !string) {
return(NULL);
}
@@ -1772,7 +1750,7 @@ internal smallDictt* setPSmallStringSmallDict(smallDictt *self, const char *key,
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
// set empty string when NULL
o = (smallt *) allocSStringTiny("");
}
@@ -1785,21 +1763,14 @@ internal smallDictt* setPSmallStringSmallDict(smallDictt *self, const char *key,
internal smallDictt* setNFreePDictSmallDict(smallDictt *self, const char *key, smallDictt *dict) {
- if (!key) {
- terminateO(dict);
+ if (!key || !dict) {
return(NULL);
}
if (checkObjectTypes && dict && !isOSmallDict(dict)) {
- terminateO(dict);
return(NULL);
}
- if (!dict) {
- sDictSetP(&(self->d), key, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -1811,21 +1782,14 @@ internal smallDictt* setNFreePDictSmallDict(smallDictt *self, const char *key, s
internal smallDictt* setNFreePArraySmallDict(smallDictt *self, const char *key, smallArrayt *array) {
- if (!key) {
- terminateO(array);
+ if (!key || !array) {
return(NULL);
}
if (checkObjectTypes && array && !isOSmallArray(array)) {
- terminateO(array);
return(NULL);
}
- if (!array) {
- sDictSetP(&(self->d), key, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -1838,21 +1802,14 @@ internal smallDictt* setNFreePArraySmallDict(smallDictt *self, const char *key,
internal smallDictt* setNFreePSmallJsonSmallDict(smallDictt *self, const char *key, smallJsont *json) {
- if (!key) {
- terminateO(json);
+ if (!key || !json) {
return(NULL);
}
if (checkObjectTypes && json && !isOSmallString(json)) {
- terminateO(json);
return(NULL);
}
- if (!json) {
- sDictSetP(&(self->d), key, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = getsoO(json);
if (!o) {
o = (smallt *)allocSUndefined();
@@ -1865,21 +1822,14 @@ internal smallDictt* setNFreePSmallJsonSmallDict(smallDictt *self, const char *k
internal smallDictt* setNFreePSmallStringSmallDict(smallDictt *self, const char *key, smallStringt *string) {
- if (!key) {
- terminateO(string);
+ if (!key || !string) {
return(NULL);
}
if (checkObjectTypes && string && !isOSmallString(string)) {
- terminateO(string);
return(NULL);
}
- if (!string) {
- sDictSetP(&(self->d), key, (smallt *)allocSStringTiny(""));
- return(self);
- }
-
if (!string->data) {
string->data = allocSStringTiny("");
}
@@ -1949,12 +1899,20 @@ internal baset* getSmallDict(smallDictt *self, const char *key) {
internal undefinedt* getUndefinedSmallDict(smallDictt *self, const char *key) {
- undefinedt *e = (undefinedt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- finishO(e);
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
}
internal bool getBoolSmallDict(smallDictt *self, const char *key) {
@@ -1963,11 +1921,6 @@ internal bool getBoolSmallDict(smallDictt *self, const char *key) {
e = getSmallBoolSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(false);
- }
-
r = e->f->get(e);
finishO(e);
}
@@ -1980,11 +1933,6 @@ internal bool* getBoolPSmallDict(smallDictt *self, const char *key) {
e = getSmallBoolSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(NULL);
- }
-
r = e->f->getP(e);
finishO(e);
}
@@ -1997,11 +1945,6 @@ internal double getDoubleSmallDict(smallDictt *self, const char *key) {
e = getSmallDoubleSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(0);
- }
-
r = e->f->get(e);
finishO(e);
}
@@ -2014,11 +1957,6 @@ internal double* getDoublePSmallDict(smallDictt *self, const char *key) {
e = getSmallDoubleSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(NULL);
- }
-
r = e->f->getP(e);
finishO(e);
}
@@ -2031,11 +1969,6 @@ internal int64_t getIntSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
-
r = e->f->get(e);
finishO(e);
}
@@ -2048,11 +1981,6 @@ internal int64_t* getIntPSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
-
r = e->f->getP(e);
finishO(e);
}
@@ -2065,11 +1993,6 @@ internal int32_t getInt32SmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
-
r = (int32_t)e->f->get(e);
finishO(e);
}
@@ -2082,11 +2005,6 @@ internal int32_t* getInt32PSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
-
r = (int32_t *)e->f->getP(e);
finishO(e);
}
@@ -2099,11 +2017,6 @@ internal uint64_t getUintSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
-
r = (uint64_t)e->f->get(e);
finishO(e);
}
@@ -2116,11 +2029,6 @@ internal uint64_t* getUintPSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
-
r = (uint64_t *)e->f->getP(e);
finishO(e);
}
@@ -2133,11 +2041,6 @@ internal uint32_t getUint32SmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
-
r = (uint32_t)e->f->get(e);
finishO(e);
}
@@ -2150,11 +2053,6 @@ internal uint32_t* getUint32PSmallDict(smallDictt *self, const char *key) {
e = getSmallIntSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
-
r = (uint32_t *)e->f->getP(e);
finishO(e);
}
@@ -2167,11 +2065,6 @@ internal char* getSSmallDict(smallDictt *self, const char *key) {
e = getSmallStringSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- finishO(e);
- return(0);
- }
-
r = e->f->get(e);
finishO(e);
}
@@ -2180,121 +2073,197 @@ internal char* getSSmallDict(smallDictt *self, const char *key) {
internal smallDictt* getDictSmallDict(smallDictt *self, const char *key) {
- smallDictt *e = (smallDictt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- finishO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
-}
-internal smallArrayt* getArraySmallDict(smallDictt *self, const char *key) {
+ smallt *o = sDictGetTiny(self->d, key);
- smallArrayt *e = (smallArrayt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- finishO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal smallBoolt* getSmallBoolSmallDict(smallDictt *self, const char *key) {
- smallBoolt *e = (smallBoolt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- finishO(e);
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+ return((smallDictt*) toBaset(o));
}
-internal smallBytest* getSmallBytesSmallDict(smallDictt *self, const char *key) {
+internal smallArrayt* getArraySmallDict(smallDictt *self, const char *key) {
- smallBytest *e = (smallBytest*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- finishO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
-}
-internal smallDoublet* getSmallDoubleSmallDict(smallDictt *self, const char *key) {
+ smallt *o = sDictGetTiny(self->d, key);
- smallDoublet *e = (smallDoublet*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- finishO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal smallIntt* getSmallIntSmallDict(smallDictt *self, const char *key) {
- smallIntt *e = (smallIntt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- finishO(e);
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+ return((smallArrayt*) toBaset(o));
}
-internal smallJsont* getSmallJsonSmallDict(smallDictt *self, const char *key) {
+internal smallBoolt* getSmallBoolSmallDict(smallDictt *self, const char *key) {
- baset *e = getSmallDict(self, key);
- if (!e) {
+ if (!key || !self->d) {
return(NULL);
}
- createAllocateSmallJson(r);
- setTopNFreeO(r, e);
- return(r);
-}
-internal smallStringt* getSmallStringSmallDict(smallDictt *self, const char *key) {
+ smallt *o = sDictGetTiny(self->d, key);
- smallStringt *e = (smallStringt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- finishO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal void* getVoidSmallDict(smallDictt *self, const char *key) {
- smallContainert *e = NULL;
- void* r = NULL;
- e = getSmallContainerSmallDict(self, key);
- if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- finishO(e);
- return(NULL);
- }
- r = e->f->get(e);
- finishO(e);
+ if (o->type != BOOL) {
+ return(NULL);
}
- return(r);
+ return((smallBoolt*) toBaset(o));
}
-internal smallContainert* getSmallContainerSmallDict(smallDictt *self, const char *key) {
+internal smallBytest* getSmallBytesSmallDict(smallDictt *self, const char *key) {
- smallContainert *e = (smallContainert*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- finishO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
-}
-
-internal baset* getKCharSmallDict(smallDictt *self, char key) {
- charToS(s, key);
- return(getSmallDict(self, s));
-}
+ smallt *o = sDictGetTiny(self->d, key);
-internal undefinedt* getUndefinedKCharSmallDict(smallDictt *self, char key) {
+ if (!o) {
+ return(NULL);
+ }
- charToS(s, key);
- return(getUndefinedSmallDict(self, s));
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*) toBaset(o));
+}
+
+internal smallDoublet* getSmallDoubleSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != DOUBLE) {
+ return(NULL);
+ }
+ return((smallDoublet*) toBaset(o));
+}
+
+internal smallIntt* getSmallIntSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != INT) {
+ return(NULL);
+ }
+ return((smallIntt*) toBaset(o));
+}
+
+internal smallJsont* getSmallJsonSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ baset *e = toBaset(o);
+ createAllocateSmallJson(r);
+ setTopNFreeO(r, e);
+ return(r);
+}
+
+internal smallStringt* getSmallStringSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
+ return(NULL);
+ }
+ return((smallStringt*) toBaset(o));
+}
+
+internal void* getVoidSmallDict(smallDictt *self, const char *key) {
+ smallContainert *e = NULL;
+ void* r = NULL;
+
+ e = getSmallContainerSmallDict(self, key);
+ if (e) {
+ r = e->f->get(e);
+ finishO(e);
+ }
+ return(r);
+}
+
+internal smallContainert* getSmallContainerSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+
+ return((smallContainert*) toBaset(o));
+}
+
+internal baset* getKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getSmallDict(self, s));
+}
+
+internal undefinedt* getUndefinedKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getUndefinedSmallDict(self, s));
}
internal bool getBoolKCharSmallDict(smallDictt *self, char key) {
@@ -2441,16 +2410,38 @@ internal baset* getNDupSmallDict(smallDictt *self, const char *key) {
return(NULL);
}
- return(toBaset(sDuplicate(sDictGetTiny(self->d, key))));
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ baset *b = ((sContainert*)o)->data;
+ return(duplicateO(b));
+ }
+ return(toBaset(sDuplicate(o)));
}
internal undefinedt* getNDupUndefinedSmallDict(smallDictt *self, const char *key) {
- undefinedt *e = (undefinedt*)getSmallDict(self, key);
- if (checkObjectTypes && e && !isOUndefined(e)) {
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
}
internal bool getNDupBoolSmallDict(smallDictt *self, const char *key) {
@@ -2539,70 +2530,128 @@ internal char* getNDupSSmallDict(smallDictt *self, const char *key) {
internal smallDictt* getNDupDictSmallDict(smallDictt *self, const char *key) {
- smallDictt *e = (smallDictt*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ return((smallDictt*) toBaset(sDuplicate(o)));
}
internal smallArrayt* getNDupArraySmallDict(smallDictt *self, const char *key) {
- smallArrayt *e = (smallArrayt*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
return(NULL);
}
- return(e);
+
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+ return((smallArrayt*) toBaset(sDuplicate(o)));
}
internal smallBoolt* getNDupSmallBoolSmallDict(smallDictt *self, const char *key) {
- smallBoolt *e = (smallBoolt*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+ return((smallBoolt*) toBaset(sDuplicate(o)));
}
internal smallBytest* getNDupSmallBytesSmallDict(smallDictt *self, const char *key) {
- smallBytest *e = (smallBytest*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*) toBaset(sDuplicate(o)));
}
internal smallDoublet* getNDupSmallDoubleSmallDict(smallDictt *self, const char *key) {
- smallDoublet *e = (smallDoublet*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*) toBaset(sDuplicate(o)));
}
internal smallIntt* getNDupSmallIntSmallDict(smallDictt *self, const char *key) {
- smallIntt *e = (smallIntt*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != INT) {
+ return(NULL);
+ }
+ return((smallIntt*) toBaset(sDuplicate(o)));
}
internal smallJsont* getNDupSmallJsonSmallDict(smallDictt *self, const char *key) {
- baset *e = getNDupSmallDict(self, key);
- if (!e) {
+ if (!key || !self->d) {
return(NULL);
}
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ baset *e = toBaset(sDuplicate(o));
createAllocateSmallJson(r);
setTopNFreeO(r, e);
return(r);
@@ -2610,12 +2659,20 @@ internal smallJsont* getNDupSmallJsonSmallDict(smallDictt *self, const char *key
internal smallStringt* getNDupSmallStringSmallDict(smallDictt *self, const char *key) {
- smallStringt *e = (smallStringt*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*) toBaset(sDuplicate(o)));
}
internal void* getNDupVoidSmallDict(smallDictt *self, const char *key) {
@@ -2624,10 +2681,6 @@ internal void* getNDupVoidSmallDict(smallDictt *self, const char *key) {
e = getNDupSmallContainerSmallDict(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -2636,12 +2689,26 @@ internal void* getNDupVoidSmallDict(smallDictt *self, const char *key) {
internal smallContainert* getNDupSmallContainerSmallDict(smallDictt *self, const char *key) {
- smallContainert *e = (smallContainert*)getNDupSmallDict(self, key);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (!key || !self->d) {
return(NULL);
}
- return(e);
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ smallContainert *e = (smallContainert*) toBaset(o);
+ smallContainert *r = duplicateO(e);
+ finishO(e);
+ return(r);
}
@@ -2657,125 +2724,647 @@ internal undefinedt* getNDupUndefinedKCharSmallDict(smallDictt *self, char key)
return(getNDupUndefinedSmallDict(self, s));
}
-internal bool getNDupBoolKCharSmallDict(smallDictt *self, char key) {
+internal bool getNDupBoolKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupBoolSmallDict(self, s));
+}
+
+internal double getNDupDoubleKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupDoubleSmallDict(self, s));
+}
+
+internal int64_t getNDupIntKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupIntSmallDict(self, s));
+}
+
+internal int32_t getNDupInt32KCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupInt32SmallDict(self, s));
+}
+
+internal uint64_t getNDupUintKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupUintSmallDict(self, s));
+}
+
+internal uint32_t getNDupUint32KCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupUint32SmallDict(self, s));
+}
+
+internal char* getNDupSKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSSmallDict(self, s));
+}
+
+internal smallDictt* getNDupDictKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupDictSmallDict(self, s));
+}
+
+internal smallArrayt* getNDupArrayKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupArraySmallDict(self, s));
+}
+
+internal smallBoolt* getNDupSmallBoolKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallBoolSmallDict(self, s));
+}
+
+internal smallBytest* getNDupSmallBytesKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallBytesSmallDict(self, s));
+}
+
+internal smallDoublet* getNDupSmallDoubleKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallDoubleSmallDict(self, s));
+}
+
+internal smallIntt* getNDupSmallIntKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallIntSmallDict(self, s));
+}
+
+internal smallJsont* getNDupSmallJsonKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallJsonSmallDict(self, s));
+}
+
+internal smallStringt* getNDupSmallStringKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallStringSmallDict(self, s));
+}
+
+internal void* getNDupVoidKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupVoidSmallDict(self, s));
+}
+
+internal smallContainert* getNDupSmallContainerKCharSmallDict(smallDictt *self, char key) {
+
+ charToS(s, key);
+ return(getNDupSmallContainerSmallDict(self, s));
+}
+
+
+internal double getNumSmallDict(smallDictt *self, const char *key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *o = sDictGetTiny(self->d, key);
+
+ if (!o) {
+ return(0);
+ }
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ baset *e = toBaset(o);
+
+ double r = 0;
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
+ }
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
+ }
+ finishO(e);
+ return(r);
+}
+
+
+internal baset* cropElemSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ if (!sm) {
+ return(NULL);
+ }
+ if (sm->type == UNDEFINED) {
+ free(sm);
+ return((baset*) allocUndefined());
+ }
+ else if (sm->type == CONTAINER) {
+ cast(sContainert*, sc, sm);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(sm);
+ free(sm);
+ return(r);
+ }
+ }
+ return(toBaset(sm));
+}
+
+
+internal undefinedt* cropElemUndefinedSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ undefinedt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (undefinedt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOUndefined(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+internal bool cropElemBoolSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(false);
+ }
+
+ smallt *sm = NULL;
+ smallBoolt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallBoolt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallBool(o)) {
+ finishO(o);
+ return(false);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ bool r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(false);
+}
+
+internal double cropElemDoubleSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallDoublet *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallDoublet*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallDouble(o)) {
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ double r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+internal int64_t cropElemIntSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ int64_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+internal int32_t cropElemInt32SmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ int32_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+internal uint64_t cropElemUintSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ uint64_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+internal uint32_t cropElemUint32SmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ uint32_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+internal char* cropElemSSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallStringt *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallStringt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallString(o)) {
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ char *r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
- charToS(s, key);
- return(getNDupBoolSmallDict(self, s));
+ return(NULL);
}
-internal double getNDupDoubleKCharSmallDict(smallDictt *self, char key) {
+internal smallDictt* cropElemDictSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupDoubleSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal int64_t getNDupIntKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallDictt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallDictt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallDict(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupIntSmallDict(self, s));
+ return(r);
}
-internal int32_t getNDupInt32KCharSmallDict(smallDictt *self, char key) {
+internal smallArrayt* cropElemArraySmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupInt32SmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal uint64_t getNDupUintKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallArrayt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallArrayt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallArray(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupUintSmallDict(self, s));
+ return(r);
}
-internal uint32_t getNDupUint32KCharSmallDict(smallDictt *self, char key) {
+internal smallBoolt* cropElemSmallBoolSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupUint32SmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal char* getNDupSKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallBoolt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallBoolt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallBool(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupSSmallDict(self, s));
+ return(r);
}
-internal smallDictt* getNDupDictKCharSmallDict(smallDictt *self, char key) {
+internal smallBytest* cropElemSmallBytesSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupDictSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal smallArrayt* getNDupArrayKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallBytest *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallBytest*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallBytes(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupArraySmallDict(self, s));
+ return(r);
}
-internal smallBoolt* getNDupSmallBoolKCharSmallDict(smallDictt *self, char key) {
+internal smallDoublet* cropElemSmallDoubleSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupSmallBoolSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal smallBytest* getNDupSmallBytesKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallDoublet *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallDoublet*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallDouble(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupSmallBytesSmallDict(self, s));
+ return(r);
}
-internal smallDoublet* getNDupSmallDoubleKCharSmallDict(smallDictt *self, char key) {
+internal smallIntt* cropElemSmallIntSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupSmallDoubleSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal smallIntt* getNDupSmallIntKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallIntt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallInt(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupSmallIntSmallDict(self, s));
+ return(r);
}
-internal smallJsont* getNDupSmallJsonKCharSmallDict(smallDictt *self, char key) {
+internal smallJsont* cropElemSmallJsonSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupSmallJsonSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal smallStringt* getNDupSmallStringKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ baset *o = toBaset(sm);
+ if (!o) {
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ createAllocateSmallJson(r);
+ setTopNFreeO(r, o);
+ return(r);
+ }
+ }
- charToS(s, key);
- return(getNDupSmallStringSmallDict(self, s));
+ return(NULL);
}
-internal void* getNDupVoidKCharSmallDict(smallDictt *self, char key) {
+internal smallStringt* cropElemSmallStringSmallDict(smallDictt *self, char* key) {
- charToS(s, key);
- return(getNDupVoidSmallDict(self, s));
-}
+ if (!key || !self->d) {
+ return(NULL);
+ }
-internal smallContainert* getNDupSmallContainerKCharSmallDict(smallDictt *self, char key) {
+ smallt *sm = NULL;
+ smallStringt *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallStringt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallString(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
- charToS(s, key);
- return(getNDupSmallContainerSmallDict(self, s));
+ return(r);
}
+internal void* cropElemVoidSmallDict(smallDictt *self, char* key) {
-internal double getNumSmallDict(smallDictt *self, const char *key) {
+ if (!key || !self->d) {
+ return(NULL);
+ }
- baset *o = getSmallDict(self, key);
+ smallt *sm = NULL;
+ smallContainert *o = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ o = (smallContainert*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallContainer(o)) {
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
- if (!o) {
- return(0);
+ void *r = o->f->get(o);
+ finishO(o);
+ return(r);
}
+ }
- double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
+ return(NULL);
+}
+
+internal smallContainert* cropElemSmallContainerSmallDict(smallDictt *self, char* key) {
+
+ if (!key || !self->d) {
+ return(NULL);
}
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+
+ smallt *sm = NULL;
+ smallContainert *r = NULL;
+ forEachSDict(self->d, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ r = (smallContainert*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallContainer(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
}
- finishO(o);
+ }
+
return(r);
}
@@ -3781,15 +4370,23 @@ internal bool isEmptySmallDict(smallDictt *self) {
internal void enumerateSmallDictF(smallDictt *self, void *closure, enumerateElementSmallDictFt funcElem) {
- forEachSmallDict(self, key, e) {
- if (!funcElem(closure, key, e)) {
- finishO(e);
- break;
- }
- finishO(e);
- }
- listFreeS(libsheepyInternalKeys);
+ forEachSDict(self->d, e) {
+ if (e->key) {
+ baset *E = toBaset(e->data);
+ if (!funcElem(closure, e->key, E)) {
+ if (e->data->type == CONTAINER && ((sContainert*)e->data)->dataType == SH_DT_BASET) {
+ break;
+ }
+ finishO(E);
+ break;
+ }
+ if (e->data->type == CONTAINER && ((sContainert*)e->data)->dataType == SH_DT_BASET) {
+ continue;
+ }
+ finishO(E);
}
+ }
+ }
internal baset* iterStartSmallDict(smallDictt *self) {
@@ -3805,12 +4402,19 @@ internal baset* iterStartSmallDict(smallDictt *self) {
self->iterIndex = i;
break;
}
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
self->iterKey = (&((self->d)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->d)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->d)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -3828,12 +4432,19 @@ internal const char* iterStartKeySmallDict(smallDictt *self) {
self->iterIndex = i;
break;
}
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
self->iterKey = (&((self->d)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->d)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->d)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterKey);
}
@@ -3845,8 +4456,10 @@ internal baset* iterNextSmallDict(smallDictt *self) {
}
// get next element
self->iterIndex++;
- // free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ // free already created base object
+ finishO(self->iterElement);
+ }
rangeFrom(i, self->iterIndex, self->d->count) {
if (&((self->d)->elements) + i) {
self->iterIndex = i;
@@ -3863,7 +4476,14 @@ internal baset* iterNextSmallDict(smallDictt *self) {
return(NULL);
}
self->iterKey = (&((self->d)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->d)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->d)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -3875,8 +4495,10 @@ internal const char* iterNextKeySmallDict(smallDictt *self) {
}
// get next element
self->iterIndex++;
- // free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ // free already created base object
+ finishO(self->iterElement);
+ }
rangeFrom(i, self->iterIndex, self->d->count) {
if (&((self->d)->elements) + i) {
self->iterIndex = i;
@@ -3893,7 +4515,14 @@ internal const char* iterNextKeySmallDict(smallDictt *self) {
return(NULL);
}
self->iterKey = (&((self->d)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->d)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->d)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterKey);
}
@@ -5581,6 +6210,101 @@ double getNumSmallDictG(smallDictt *self, const char *key) {
return(self->f->getNum(self, key));
}
+baset* cropElemSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElem(self, key));
+}
+
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemUndefined(self, key));
+}
+
+bool cropElemBoolSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemBool(self, key));
+}
+
+double cropElemDoubleSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemDouble(self, key));
+}
+
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemInt(self, key));
+}
+
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemInt32(self, key));
+}
+
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemUint(self, key));
+}
+
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemUint32(self, key));
+}
+
+char* cropElemSSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemS(self, key));
+}
+
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemDict(self, key));
+}
+
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemArray(self, key));
+}
+
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallBool(self, key));
+}
+
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallBytes(self, key));
+}
+
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallDouble(self, key));
+}
+
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallInt(self, key));
+}
+
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallJson(self, key));
+}
+
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallString(self, key));
+}
+
+void* cropElemVoidSmallDictG (smallDictt *self, char* key) {
+
+ return(self->f->cropElemVoid(self, key));
+}
+
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key) {
+
+ return(self->f->cropElemSmallContainer(self, key));
+}
+
smallDictt* delSmallDictG (smallDictt *self, const char *key, int unused UNUSED) {
return(self->f->del(self,key));
diff --git a/src/json/libsheepyCSmallDict.h b/src/json/libsheepyCSmallDict.h
@@ -349,6 +349,38 @@ typedef smallContainert* (*getNDupSmallContainerKCharSmallDictFt)(smallDictt *se
typedef double (*getNumSmallDictFt) (smallDictt *self, const char *key);
/**
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
+ */
+typedef baset* (*cropElemSmallDictFt) (smallDictt *self, char* key);
+typedef undefinedt* (*cropElemUndefinedSmallDictFt) (smallDictt *self, char* key);
+typedef bool (*cropElemBoolSmallDictFt) (smallDictt *self, char* key);
+typedef double (*cropElemDoubleSmallDictFt) (smallDictt *self, char* key);
+typedef int64_t (*cropElemIntSmallDictFt) (smallDictt *self, char* key);
+typedef int32_t (*cropElemInt32SmallDictFt) (smallDictt *self, char* key);
+typedef uint64_t (*cropElemUintSmallDictFt) (smallDictt *self, char* key);
+typedef uint32_t (*cropElemUint32SmallDictFt) (smallDictt *self, char* key);
+typedef char* (*cropElemSSmallDictFt) (smallDictt *self, char* key);
+typedef smallDictt* (*cropElemDictSmallDictFt) (smallDictt *self, char* key);
+typedef smallArrayt* (*cropElemArraySmallDictFt) (smallDictt *self, char* key);
+typedef smallBoolt* (*cropElemSmallBoolSmallDictFt) (smallDictt *self, char* key);
+typedef smallBytest* (*cropElemSmallBytesSmallDictFt) (smallDictt *self, char* key);
+typedef smallDoublet* (*cropElemSmallDoubleSmallDictFt) (smallDictt *self, char* key);
+typedef smallIntt* (*cropElemSmallIntSmallDictFt) (smallDictt *self, char* key);
+typedef smallJsont* (*cropElemSmallJsonSmallDictFt) (smallDictt *self, char* key);
+typedef smallStringt* (*cropElemSmallStringSmallDictFt) (smallDictt *self, char* key);
+typedef void* (*cropElemVoidSmallDictFt) (smallDictt *self, char* key);
+typedef smallContainert* (*cropElemSmallContainerSmallDictFt) (smallDictt *self, char* key);
+
+/**
* delete element
*
* free element sObject for given key
@@ -847,7 +879,26 @@ typedef bool (*areAllEBytesSmallDictFt) (smallDictt *self);
getNDupSmallStringKCharSmallDictFt getNDupSmallStringKChar;\
getNDupVoidKCharSmallDictFt getNDupVoidKChar;\
getNDupSmallContainerKCharSmallDictFt getNDupSmallContainerKChar;\
- getNumSmallDictFt getNum;\
+ getNumSmallDictFt getNum;\
+ cropElemSmallDictFt cropElem;\
+ cropElemUndefinedSmallDictFt cropElemUndefined;\
+ cropElemBoolSmallDictFt cropElemBool;\
+ cropElemDoubleSmallDictFt cropElemDouble;\
+ cropElemIntSmallDictFt cropElemInt;\
+ cropElemInt32SmallDictFt cropElemInt32;\
+ cropElemUintSmallDictFt cropElemUint;\
+ cropElemUint32SmallDictFt cropElemUint32;\
+ cropElemSSmallDictFt cropElemS;\
+ cropElemDictSmallDictFt cropElemDict;\
+ cropElemArraySmallDictFt cropElemArray;\
+ cropElemSmallBoolSmallDictFt cropElemSmallBool;\
+ cropElemSmallBytesSmallDictFt cropElemSmallBytes;\
+ cropElemSmallDoubleSmallDictFt cropElemSmallDouble;\
+ cropElemSmallIntSmallDictFt cropElemSmallInt;\
+ cropElemSmallJsonSmallDictFt cropElemSmallJson;\
+ cropElemSmallStringSmallDictFt cropElemSmallString;\
+ cropElemVoidSmallDictFt cropElemVoid;\
+ cropElemSmallContainerSmallDictFt cropElemSmallContainer;\
delSmallDictFt del;\
delKCharSmallDictFt delKChar;\
hasSmallDictFt has;\
@@ -972,6 +1023,12 @@ struct smallDict {
ssize_t iterIndex;
char* iterKey;
baset* iterElement;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
};
// base
@@ -1212,6 +1269,25 @@ bool icEqualSmallDictBaseG (smallDictt* self, baset* p2);
bool icEqualSmallDictSmallJsonG(smallDictt* self, smallJsont* p2);
bool icEqualSmallDictG (smallDictt* self, smallDictt* p2);
+baset* cropElemSmallDictG (smallDictt *self, char* key);
+undefinedt* cropElemUndefinedSmallDictG (smallDictt *self, char* key);
+bool cropElemBoolSmallDictG (smallDictt *self, char* key);
+double cropElemDoubleSmallDictG (smallDictt *self, char* key);
+int64_t cropElemIntSmallDictG (smallDictt *self, char* key);
+int32_t cropElemInt32SmallDictG (smallDictt *self, char* key);
+uint64_t cropElemUintSmallDictG (smallDictt *self, char* key);
+uint32_t cropElemUint32SmallDictG (smallDictt *self, char* key);
+char* cropElemSSmallDictG (smallDictt *self, char* key);
+smallDictt* cropElemDictSmallDictG (smallDictt *self, char* key);
+smallArrayt* cropElemArraySmallDictG (smallDictt *self, char* key);
+smallBoolt* cropElemSmallBoolSmallDictG (smallDictt *self, char* key);
+smallBytest* cropElemSmallBytesSmallDictG (smallDictt *self, char* key);
+smallDoublet* cropElemSmallDoubleSmallDictG (smallDictt *self, char* key);
+smallIntt* cropElemSmallIntSmallDictG (smallDictt *self, char* key);
+smallJsont* cropElemSmallJsonSmallDictG (smallDictt *self, char* key);
+smallStringt* cropElemSmallStringSmallDictG (smallDictt *self, char* key);
+void* cropElemVoidSmallDictG (smallDictt *self, char* key);
+smallContainert* cropElemSmallContainerSmallDictG(smallDictt *self, char* key);
smallDictt* delSmallDictG (smallDictt *self, const char *key, int unused UNUSED);
smallDictt* delKCharSmallDictG (smallDictt *self, char key, int unused UNUSED);
smallDictt* delElemSmallDictG (smallDictt *self, const char *key);
diff --git a/src/json/libsheepyCSmallJson.c b/src/json/libsheepyCSmallJson.c
@@ -311,8 +311,8 @@ internal smallJsont* dequeueSmallJsonSmallJson(smallJsont *self);
internal smallStringt* dequeueSmallStringSmallJson(smallJsont *self);
internal void* dequeueVoidSmallJson(smallJsont *self);
internal smallContainert* dequeueSmallContainerSmallJson(smallJsont *self);
-internal smallJsont* reverseSmallJson(smallJsont *self);
internal double dequeueNumSmallJson(smallJsont *self);
+internal smallJsont* reverseSmallJson(smallJsont *self);
internal smallJsont* catSmallJson(smallJsont *self, ...);
internal smallJsont* mergeDictSmallJson(smallJsont *self, smallDictt *smallDict);
internal smallJsont* mergeDictNSmashSmallJson(smallJsont *self, smallDictt *smallDict);
@@ -329,6 +329,48 @@ internal smallJsont* shiftSmallJsonNSmashSmallJson(smallJsont *self, smallJsont
internal smallJsont* addSmallJson(smallJsont *self, smallArrayt *array);
internal smallJsont* addJsonSmallJson(smallJsont *self, smallJsont *array);
internal smallJsont* sliceSmallJson(smallJsont *self, intmax_t start, intmax_t end);
+internal smallJsont* cropSmallJson(smallJsont *self, intmax_t start, intmax_t end);
+internal char* cropSSmallJson(smallJsont *self, intmax_t start, intmax_t end);
+internal smallStringt* cropSmallStringSmallJson(smallJsont *self, intmax_t start, intmax_t end);
+internal baset* cropElemAtSmallJson(smallJsont *self, intmax_t index);
+internal undefinedt* cropElemAtUndefinedSmallJson(smallJsont *self, intmax_t index);
+internal bool cropElemAtBoolSmallJson(smallJsont *self, intmax_t index);
+internal double cropElemAtDoubleSmallJson(smallJsont *self, intmax_t index);
+internal int64_t cropElemAtIntSmallJson(smallJsont *self, intmax_t index);
+internal int32_t cropElemAtInt32SmallJson(smallJsont *self, intmax_t index);
+internal uint64_t cropElemAtUintSmallJson(smallJsont *self, intmax_t index);
+internal uint32_t cropElemAtUint32SmallJson(smallJsont *self, intmax_t index);
+internal char* cropElemAtSSmallJson(smallJsont *self, intmax_t index);
+internal char cropElemAtCharSmallJson(smallJsont *self, intmax_t index);
+internal smallDictt* cropElemAtDictSmallJson(smallJsont *self, intmax_t index);
+internal smallArrayt* cropElemAtArraySmallJson(smallJsont *self, intmax_t index);
+internal smallBoolt* cropElemAtSmallBoolSmallJson(smallJsont *self, intmax_t index);
+internal smallBytest* cropElemAtSmallBytesSmallJson(smallJsont *self, intmax_t index);
+internal smallDoublet* cropElemAtSmallDoubleSmallJson(smallJsont *self, intmax_t index);
+internal smallIntt* cropElemAtSmallIntSmallJson(smallJsont *self, intmax_t index);
+internal smallJsont* cropElemAtSmallJsonSmallJson(smallJsont *self, intmax_t index);
+internal smallStringt* cropElemAtSmallStringSmallJson(smallJsont *self, intmax_t index);
+internal void* cropElemAtVoidSmallJson(smallJsont *self, intmax_t index);
+internal smallContainert* cropElemAtSmallContainerSmallJson(smallJsont *self, intmax_t index);
+internal baset* cropElemKeySmallJson(smallJsont *self, char* key);
+internal undefinedt* cropElemKeyUndefinedSmallJson(smallJsont *self, char* key);
+internal bool cropElemKeyBoolSmallJson(smallJsont *self, char* key);
+internal double cropElemKeyDoubleSmallJson(smallJsont *self, char* key);
+internal int64_t cropElemKeyIntSmallJson(smallJsont *self, char* key);
+internal int32_t cropElemKeyInt32SmallJson(smallJsont *self, char* key);
+internal uint64_t cropElemKeyUintSmallJson(smallJsont *self, char* key);
+internal uint32_t cropElemKeyUint32SmallJson(smallJsont *self, char* key);
+internal char* cropElemKeySSmallJson(smallJsont *self, char* key);
+internal smallDictt* cropElemKeyDictSmallJson(smallJsont *self, char* key);
+internal smallArrayt* cropElemKeyArraySmallJson(smallJsont *self, char* key);
+internal smallBoolt* cropElemKeySmallBoolSmallJson(smallJsont *self, char* key);
+internal smallBytest* cropElemKeySmallBytesSmallJson(smallJsont *self, char* key);
+internal smallDoublet* cropElemKeySmallDoubleSmallJson(smallJsont *self, char* key);
+internal smallIntt* cropElemKeySmallIntSmallJson(smallJsont *self, char* key);
+internal smallJsont* cropElemKeySmallJsonSmallJson(smallJsont *self, char* key);
+internal smallStringt* cropElemKeySmallStringSmallJson(smallJsont *self, char* key);
+internal void* cropElemKeyVoidSmallJson(smallJsont *self, char* key);
+internal smallContainert* cropElemKeySmallContainerSmallJson(smallJsont *self, char* key);
internal smallJsont* copySmallJson(smallJsont *self, intmax_t start, intmax_t end);
internal smallJsont* insertSmallJson(smallJsont *self, intmax_t index, smallArrayt *toInsert);
internal smallJsont* insertNSmashSmallJson(smallJsont *self, intmax_t index, smallArrayt *toInsert);
@@ -1214,6 +1256,48 @@ smallJsont* shiftSmallJsonNSmashSmallJsonG(smallJsont *self, smallJsont *array);
smallJsont* addSmallJsonG (smallJsont *self, smallArrayt *array);
smallJsont* addJsonSmallJsonG (smallJsont *self, smallJsont *array);
smallJsont* sliceSmallJsonG(smallJsont *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+char* cropSSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
+char cropElemAtCharSmallJsonG (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key);
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key);
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key);
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key);
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key);
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key);
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key);
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key);
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key);
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key);
smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
smallJsont* insertSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
smallJsont* insertNSmashSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
@@ -1591,815 +1675,858 @@ void initiateSmallJson(smallJsont *self) {
smallJsonF = malloc(sizeof(smallJsonFunctionst));
registerMethodsSmallJson(smallJsonF);
}
- self->f = smallJsonF;
- self->topU = NULL;
- self->topB = NULL;
- self->topD = NULL;
- self->topI = NULL;
- self->topS = NULL;
- self->top = NULL;
- self->topA = NULL;
- self->topIsA = SMALLJSON_IS_EMPTY;
- self->iterIndex = -1;
- self->iterKey = NULL;
- self->iterStep = 0;
- self->iterElement = NULL;
+ self->f = smallJsonF;
+ self->topU = NULL;
+ self->topB = NULL;
+ self->topD = NULL;
+ self->topI = NULL;
+ self->topS = NULL;
+ self->top = NULL;
+ self->topA = NULL;
+ self->topIsA = SMALLJSON_IS_EMPTY;
+ self->iterIndex = -1;
+ self->iterKey = NULL;
+ self->iterStep = 0;
+ self->iterElement = NULL;
+ self->iterElementDataType = 0;
}
void registerMethodsSmallJson(smallJsonFunctionst *f) {
- f->free = freeSmallJson;
- f->terminate = terminateSmallJson;
- f->toString = toStringSmallJson;
- f->duplicate = duplicateSmallJson;
-
- f->dispose = disposeSmallJson;
- f->reset = resetSmallJson;
- f->smash = smashSmallJson;
- f->finish = finishSmallJson;
- f->help = helpSmallJson;
- f->getso = getsoSmallJson;
- f->setso = setsoSmallJson;
- f->mirror = mirrorSmallJson;
- f->getTopType = getTopTypeSmallJson;
- f->setTypeUndefined = setTypeUndefinedSmallJson;
- f->setTypeBool = setTypeBoolSmallJson;
- f->setTypeDouble = setTypeDoubleSmallJson;
- f->setTypeInt = setTypeIntSmallJson;
- f->setTypeString = setTypeStringSmallJson;
- f->setTypeDict = setTypeDictSmallJson;
- f->setTypeArray = setTypeArraySmallJson;
- f->setTop = setTopSmallJson;
- f->setTopBool = setTopBoolSmallJson;
- f->setTopDouble = setTopDoubleSmallJson;
- f->setTopInt = setTopIntSmallJson;
- f->setTopString = setTopStringSmallJson;
- f->setTopChar = setTopCharSmallJson;
- f->setTopDict = setTopDictSmallJson;
- f->setTopArray = setTopArraySmallJson;
- f->setTopArrayc = setTopArraycSmallJson;
- f->setTopSmallBool = setTopSmallBoolSmallJson;
- f->setTopSmallDouble = setTopSmallDoubleSmallJson;
- f->setTopSmallInt = setTopSmallIntSmallJson;
- f->setTopSmallJson = setTopSmallJsonSmallJson;
- f->setTopSmallString = setTopSmallStringSmallJson;
- f->setTopNFree = setTopNFreeSmallJson;
- f->setTopNFreeBool = setTopNFreeBoolSmallJson;
- f->setTopNFreeDouble = setTopNFreeDoubleSmallJson;
- f->setTopNFreeInt = setTopNFreeIntSmallJson;
- f->setTopNFreeString = setTopNFreeStringSmallJson;
- f->setTopNFreeDict = setTopNFreeDictSmallJson;
- f->setTopNFreeArray = setTopNFreeArraySmallJson;
- f->setTopNFreeArrayc = setTopNFreeArraycSmallJson;
- f->setTopNFreeSmallBool = setTopNFreeSmallBoolSmallJson;
- f->setTopNFreeSmallDouble = setTopNFreeSmallDoubleSmallJson;
- f->setTopNFreeSmallInt = setTopNFreeSmallIntSmallJson;
- f->setTopNFreeSmallJson = setTopNFreeSmallJsonSmallJson;
- f->setTopNFreeSmallString = setTopNFreeSmallStringSmallJson;
- f->fromArray = fromArraySmallJson;
- f->fromArrayNFree = fromArrayNFreeSmallJson;
- f->fromArrayDict = fromArrayDictSmallJson;
- f->toArrayDict = toArrayDictSmallJson;
- f->getTop = getTopSmallJson;
- f->getTopUndefined = getTopUndefinedSmallJson;
- f->getTopBool = getTopBoolSmallJson;
- f->getTopBoolP = getTopBoolPSmallJson;
- f->getTopDouble = getTopDoubleSmallJson;
- f->getTopDoubleP = getTopDoublePSmallJson;
- f->getTopInt = getTopIntSmallJson;
- f->getTopIntP = getTopIntPSmallJson;
- f->getTopInt32 = getTopInt32SmallJson;
- f->getTopInt32P = getTopInt32PSmallJson;
- f->getTopUint = getTopUintSmallJson;
- f->getTopUintP = getTopUintPSmallJson;
- f->getTopUint32 = getTopUint32SmallJson;
- f->getTopUint32P = getTopUint32PSmallJson;
- f->getTopS = getTopSSmallJson;
- f->getTopDict = getTopDictSmallJson;
- f->getTopArray = getTopArraySmallJson;
- f->getTopSmallBool = getTopSmallBoolSmallJson;
- f->getTopSmallDouble = getTopSmallDoubleSmallJson;
- f->getTopSmallInt = getTopSmallIntSmallJson;
- f->getTopSmallString = getTopSmallStringSmallJson;
- f->keyIs = keyIsSmallJson;
- f->keyIsS = keyIsSSmallJson;
- f->makeKey = makeKeySmallJson;
- f->iMakeKey = iMakeKeySmallJson;
- f->bMakeKey = bMakeKeySmallJson;
- f->bLMakeKey = bLMakeKeySmallJson;
- f->makeKeyLen = makeKeyLenSmallJson;
- f->set = setSmallJson;
- f->setUndefined = setUndefinedSmallJson;
- f->setBool = setBoolSmallJson;
- f->setDouble = setDoubleSmallJson;
- f->setInt = setIntSmallJson;
- f->setS = setSSmallJson;
- f->setChar = setCharSmallJson;
- f->setDict = setDictSmallJson;
- f->setArray = setArraySmallJson;
- f->setArrayc = setArraycSmallJson;
- f->setSmallBool = setSmallBoolSmallJson;
- f->setSmallBytes = setSmallBytesSmallJson;
- f->setSmallDouble = setSmallDoubleSmallJson;
- f->setSmallInt = setSmallIntSmallJson;
- f->setSmallJson = setSmallJsonSmallJson;
- f->setSmallString = setSmallStringSmallJson;
- f->setSmallContainer = setSmallContainerSmallJson;
- f->setNFree = setNFreeSmallJson;
- f->setNFreeUndefined = setNFreeUndefinedSmallJson;
- f->setNFreeS = setNFreeSSmallJson;
- f->setNFreeDict = setNFreeDictSmallJson;
- f->setNFreeArray = setNFreeArraySmallJson;
- f->setNFreeArrayc = setNFreeArraycSmallJson;
- f->setNFreeSmallBool = setNFreeSmallBoolSmallJson;
- f->setNFreeSmallBytes = setNFreeSmallBytesSmallJson;
- f->setNFreeSmallDouble = setNFreeSmallDoubleSmallJson;
- f->setNFreeSmallInt = setNFreeSmallIntSmallJson;
- f->setNFreeSmallJson = setNFreeSmallJsonSmallJson;
- f->setNFreeSmallString = setNFreeSmallStringSmallJson;
- f->setNFreeSmallContainer = setNFreeSmallContainerSmallJson;
- f->setPDict = setPDictSmallJson;
- f->setPArray = setPArraySmallJson;
- f->setPSmallJson = setPSmallJsonSmallJson;
- f->setPSmallString = setPSmallStringSmallJson;
- f->setNFreePDict = setNFreePDictSmallJson;
- f->setNFreePArray = setNFreePArraySmallJson;
- f->setNFreePSmallJson = setNFreePSmallJsonSmallJson;
- f->setNFreePSmallString = setNFreePSmallStringSmallJson;
- f->setAt = setAtSmallJson;
- f->setAtUndefined = setAtUndefinedSmallJson;
- f->setAtBool = setAtBoolSmallJson;
- f->setAtDouble = setAtDoubleSmallJson;
- f->setAtInt = setAtIntSmallJson;
- f->setAtS = setAtSSmallJson;
- f->setAtChar = setAtCharSmallJson;
- f->setAtDict = setAtDictSmallJson;
- f->setAtArray = setAtArraySmallJson;
- f->setAtArrayc = setAtArraycSmallJson;
- f->setAtSmallBool = setAtSmallBoolSmallJson;
- f->setAtSmallBytes = setAtSmallBytesSmallJson;
- f->setAtSmallDouble = setAtSmallDoubleSmallJson;
- f->setAtSmallInt = setAtSmallIntSmallJson;
- f->setAtSmallJson = setAtSmallJsonSmallJson;
- f->setAtSmallString = setAtSmallStringSmallJson;
- f->setAtSmallContainer = setAtSmallContainerSmallJson;
- f->setAtNFree = setAtNFreeSmallJson;
- f->setAtNFreeUndefined = setAtNFreeUndefinedSmallJson;
- f->setAtNFreeS = setAtNFreeSSmallJson;
- f->setAtNFreeDict = setAtNFreeDictSmallJson;
- f->setAtNFreeArray = setAtNFreeArraySmallJson;
- f->setAtNFreeArrayc = setAtNFreeArraycSmallJson;
- f->setAtNFreeSmallBool = setAtNFreeSmallBoolSmallJson;
- f->setAtNFreeSmallBytes = setAtNFreeSmallBytesSmallJson;
- f->setAtNFreeSmallDouble = setAtNFreeSmallDoubleSmallJson;
- f->setAtNFreeSmallInt = setAtNFreeSmallIntSmallJson;
- f->setAtNFreeSmallJson = setAtNFreeSmallJsonSmallJson;
- f->setAtNFreeSmallString = setAtNFreeSmallStringSmallJson;
- f->setAtNFreeSmallContainer = setAtNFreeSmallContainerSmallJson;
- f->setPAtDict = setPAtDictSmallJson;
- f->setPAtArray = setPAtArraySmallJson;
- f->setPAtSmallJson = setPAtSmallJsonSmallJson;
- f->setPAtSmallString = setPAtSmallStringSmallJson;
- f->setPAtNFreeDict = setPAtNFreeDictSmallJson;
- f->setPAtNFreeArray = setPAtNFreeArraySmallJson;
- f->setPAtNFreeSmallJson = setPAtNFreeSmallJsonSmallJson;
- f->setPAtNFreeSmallString = setPAtNFreeSmallStringSmallJson;
- f->get = getSmallJson;
- f->getUndefined = getUndefinedSmallJson;
- f->getBool = getBoolSmallJson;
- f->getBoolP = getBoolPSmallJson;
- f->getDouble = getDoubleSmallJson;
- f->getDoubleP = getDoublePSmallJson;
- f->getInt = getIntSmallJson;
- f->getIntP = getIntPSmallJson;
- f->getInt32 = getInt32SmallJson;
- f->getInt32P = getInt32PSmallJson;
- f->getUint = getUintSmallJson;
- f->getUintP = getUintPSmallJson;
- f->getUint32 = getUint32SmallJson;
- f->getUint32P = getUint32PSmallJson;
- f->getS = getSSmallJson;
- f->getDict = getDictSmallJson;
- f->getArray = getArraySmallJson;
- f->getSmallBool = getSmallBoolSmallJson;
- f->getSmallBytes = getSmallBytesSmallJson;
- f->getSmallDouble = getSmallDoubleSmallJson;
- f->getSmallInt = getSmallIntSmallJson;
- f->getSmallJson = getSmallJsonSmallJson;
- f->getSmallString = getSmallStringSmallJson;
- f->getVoid = getVoidSmallJson;
- f->getSmallContainer = getSmallContainerSmallJson;
- f->getNDup = getNDupSmallJson;
- f->getNDupUndefined = getNDupUndefinedSmallJson;
- f->getNDupBool = getNDupBoolSmallJson;
- f->getNDupDouble = getNDupDoubleSmallJson;
- f->getNDupInt = getNDupIntSmallJson;
- f->getNDupInt32 = getNDupInt32SmallJson;
- f->getNDupUint = getNDupUintSmallJson;
- f->getNDupUint32 = getNDupUint32SmallJson;
- f->getNDupS = getNDupSSmallJson;
- f->getNDupDict = getNDupDictSmallJson;
- f->getNDupArray = getNDupArraySmallJson;
- f->getNDupSmallBool = getNDupSmallBoolSmallJson;
- f->getNDupSmallBytes = getNDupSmallBytesSmallJson;
- f->getNDupSmallDouble = getNDupSmallDoubleSmallJson;
- f->getNDupSmallInt = getNDupSmallIntSmallJson;
- f->getNDupSmallJson = getNDupSmallJsonSmallJson;
- f->getNDupSmallString = getNDupSmallStringSmallJson;
- f->getNDupVoid = getNDupVoidSmallJson;
- f->getNDupSmallContainer = getNDupSmallContainerSmallJson;
- f->getAt = getAtSmallJson;
- f->getAtUndefined = getAtUndefinedSmallJson;
- f->getAtBool = getAtBoolSmallJson;
- f->getAtBoolP = getAtBoolPSmallJson;
- f->getAtDouble = getAtDoubleSmallJson;
- f->getAtDoubleP = getAtDoublePSmallJson;
- f->getAtInt = getAtIntSmallJson;
- f->getAtIntP = getAtIntPSmallJson;
- f->getAtInt32 = getAtInt32SmallJson;
- f->getAtInt32P = getAtInt32PSmallJson;
- f->getAtUint = getAtUintSmallJson;
- f->getAtUintP = getAtUintPSmallJson;
- f->getAtUint32 = getAtUint32SmallJson;
- f->getAtUint32P = getAtUint32PSmallJson;
- f->getAtS = getAtSSmallJson;
- f->getAtDict = getAtDictSmallJson;
- f->getAtArray = getAtArraySmallJson;
- f->getAtSmallBool = getAtSmallBoolSmallJson;
- f->getAtSmallBytes = getAtSmallBytesSmallJson;
- f->getAtSmallDouble = getAtSmallDoubleSmallJson;
- f->getAtSmallInt = getAtSmallIntSmallJson;
- f->getAtSmallJson = getAtSmallJsonSmallJson;
- f->getAtSmallString = getAtSmallStringSmallJson;
- f->getAtVoid = getAtVoidSmallJson;
- f->getAtSmallContainer = getAtSmallContainerSmallJson;
- f->getAtNDup = getAtNDupSmallJson;
- f->getAtNDupUndefined = getAtNDupUndefinedSmallJson;
- f->getAtNDupBool = getAtNDupBoolSmallJson;
- f->getAtNDupDouble = getAtNDupDoubleSmallJson;
- f->getAtNDupInt = getAtNDupIntSmallJson;
- f->getAtNDupInt32 = getAtNDupInt32SmallJson;
- f->getAtNDupUint = getAtNDupUintSmallJson;
- f->getAtNDupUint32 = getAtNDupUint32SmallJson;
- f->getAtNDupS = getAtNDupSSmallJson;
- f->getAtNDupDict = getAtNDupDictSmallJson;
- f->getAtNDupArray = getAtNDupArraySmallJson;
- f->getAtNDupSmallBool = getAtNDupSmallBoolSmallJson;
- f->getAtNDupSmallBytes = getAtNDupSmallBytesSmallJson;
- f->getAtNDupSmallDouble = getAtNDupSmallDoubleSmallJson;
- f->getAtNDupSmallInt = getAtNDupSmallIntSmallJson;
- f->getAtNDupSmallJson = getAtNDupSmallJsonSmallJson;
- f->getAtNDupSmallString = getAtNDupSmallStringSmallJson;
- f->getAtNDupVoid = getAtNDupVoidSmallJson;
- f->getAtNDupSmallContainer = getAtNDupSmallContainerSmallJson;
- f->getNum = getNumSmallJson;
- f->getNumAt = getNumAtSmallJson;
- f->delElem = delElemSmallJson;
- f->del = delSmallJson;
- f->delElemIndex = delElemIndexSmallJson;
- f->push = pushSmallJson;
- f->pushUndefined = pushUndefinedSmallJson;
- f->pushBool = pushBoolSmallJson;
- f->pushDouble = pushDoubleSmallJson;
- f->pushInt = pushIntSmallJson;
- f->pushS = pushSSmallJson;
- f->pushChar = pushCharSmallJson;
- f->pushDict = pushDictSmallJson;
- f->pushArray = pushArraySmallJson;
- f->pushArrayc = pushArraycSmallJson;
- f->pushSmallBool = pushSmallBoolSmallJson;
- f->pushSmallBytes = pushSmallBytesSmallJson;
- f->pushSmallDouble = pushSmallDoubleSmallJson;
- f->pushSmallInt = pushSmallIntSmallJson;
- f->pushSmallJson = pushSmallJsonSmallJson;
- f->pushSmallString = pushSmallStringSmallJson;
- f->pushSmallContainer = pushSmallContainerSmallJson;
- f->pushNFree = pushNFreeSmallJson;
- f->pushNFreeUndefined = pushNFreeUndefinedSmallJson;
- f->pushNFreeS = pushNFreeSSmallJson;
- f->pushNFreeDict = pushNFreeDictSmallJson;
- f->pushNFreeArray = pushNFreeArraySmallJson;
- f->pushNFreeArrayc = pushNFreeArraycSmallJson;
- f->pushNFreeSmallBool = pushNFreeSmallBoolSmallJson;
- f->pushNFreeSmallBytes = pushNFreeSmallBytesSmallJson;
- f->pushNFreeSmallDouble = pushNFreeSmallDoubleSmallJson;
- f->pushNFreeSmallInt = pushNFreeSmallIntSmallJson;
- f->pushNFreeSmallJson = pushNFreeSmallJsonSmallJson;
- f->pushNFreeSmallString = pushNFreeSmallStringSmallJson;
- f->pushNFreeSmallContainer = pushNFreeSmallContainerSmallJson;
- f->pushMany = pushManySmallJson;
- f->pushManyS = pushManySSmallJson;
- f->catSt = pushManySSmallJson;
- f->pushNFreeMany = pushNFreeManySmallJson;
- f->pushNFreeManyS = pushNFreeManySSmallJson;
- f->pop = popSmallJson;
- f->popUndefined = popUndefinedSmallJson;
- f->popBool = popBoolSmallJson;
- f->popDouble = popDoubleSmallJson;
- f->popInt = popIntSmallJson;
- f->popInt32 = popInt32SmallJson;
- f->popUint = popUintSmallJson;
- f->popUint32 = popUint32SmallJson;
- f->popS = popSSmallJson;
- f->popDict = popDictSmallJson;
- f->popArray = popArraySmallJson;
- f->popSmallBool = popSmallBoolSmallJson;
- f->popSmallBytes = popSmallBytesSmallJson;
- f->popSmallDouble = popSmallDoubleSmallJson;
- f->popSmallInt = popSmallIntSmallJson;
- f->popSmallJson = popSmallJsonSmallJson;
- f->popSmallString = popSmallStringSmallJson;
- f->popVoid = popVoidSmallJson;
- f->popSmallContainer = popSmallContainerSmallJson;
- f->popNum = popNumSmallJson;
- f->prepend = prependSmallJson;
- f->prependUndefined = prependUndefinedSmallJson;
- f->prependBool = prependBoolSmallJson;
- f->prependDouble = prependDoubleSmallJson;
- f->prependInt = prependIntSmallJson;
- f->prependS = prependSSmallJson;
- f->prependChar = prependCharSmallJson;
- f->prependDict = prependDictSmallJson;
- f->prependArray = prependArraySmallJson;
- f->prependArrayc = prependArraycSmallJson;
- f->prependSmallBool = prependSmallBoolSmallJson;
- f->prependSmallBytes = prependSmallBytesSmallJson;
- f->prependSmallDouble = prependSmallDoubleSmallJson;
- f->prependSmallInt = prependSmallIntSmallJson;
- f->prependSmallJson = prependSmallJsonSmallJson;
- f->prependSmallString = prependSmallStringSmallJson;
- f->prependSmallContainer = prependSmallContainerSmallJson;
- f->prependNFree = prependNFreeSmallJson;
- f->prependNFreeUndefined = prependNFreeUndefinedSmallJson;
- f->prependNFreeS = prependNFreeSSmallJson;
- f->prependNFreeDict = prependNFreeDictSmallJson;
- f->prependNFreeArray = prependNFreeArraySmallJson;
- f->prependNFreeArrayc = prependNFreeArraycSmallJson;
- f->prependNFreeSmallBool = prependNFreeSmallBoolSmallJson;
- f->prependNFreeSmallBytes = prependNFreeSmallBytesSmallJson;
- f->prependNFreeSmallDouble = prependNFreeSmallDoubleSmallJson;
- f->prependNFreeSmallInt = prependNFreeSmallIntSmallJson;
- f->prependNFreeSmallJson = prependNFreeSmallJsonSmallJson;
- f->prependNFreeSmallString = prependNFreeSmallStringSmallJson;
- f->prependNFreeSmallContainer = prependNFreeSmallContainerSmallJson;
- f->dequeue = dequeueSmallJson;
- f->dequeueUndefined = dequeueUndefinedSmallJson;
- f->dequeueBool = dequeueBoolSmallJson;
- f->dequeueDouble = dequeueDoubleSmallJson;
- f->dequeueInt = dequeueIntSmallJson;
- f->dequeueInt32 = dequeueInt32SmallJson;
- f->dequeueUint = dequeueUintSmallJson;
- f->dequeueUint32 = dequeueUint32SmallJson;
- f->dequeueS = dequeueSSmallJson;
- f->dequeueDict = dequeueDictSmallJson;
- f->dequeueArray = dequeueArraySmallJson;
- f->dequeueSmallBool = dequeueSmallBoolSmallJson;
- f->dequeueSmallBytes = dequeueSmallBytesSmallJson;
- f->dequeueSmallDouble = dequeueSmallDoubleSmallJson;
- f->dequeueSmallInt = dequeueSmallIntSmallJson;
- f->dequeueSmallJson = dequeueSmallJsonSmallJson;
- f->dequeueSmallString = dequeueSmallStringSmallJson;
- f->dequeueVoid = dequeueVoidSmallJson;
- f->dequeueSmallContainer = dequeueSmallContainerSmallJson;
- f->dequeueNum = dequeueNumSmallJson;
- f->reverse = reverseSmallJson;
- f->cat = catSmallJson;
- f->mergeDict = mergeDictSmallJson;
- f->mergeDictNSmash = mergeDictNSmashSmallJson;
- f->merge = mergeSmallJson;
- f->mergeNSmash = mergeNSmashSmallJson;
- f->append = appendSmallJson;
- f->appendNSmash = appendNSmashSmallJson;
+ f->free = freeSmallJson;
+ f->terminate = terminateSmallJson;
+ f->toString = toStringSmallJson;
+ f->duplicate = duplicateSmallJson;
+
+ f->dispose = disposeSmallJson;
+ f->reset = resetSmallJson;
+ f->smash = smashSmallJson;
+ f->finish = finishSmallJson;
+ f->help = helpSmallJson;
+ f->getso = getsoSmallJson;
+ f->setso = setsoSmallJson;
+ f->mirror = mirrorSmallJson;
+ f->getTopType = getTopTypeSmallJson;
+ f->setTypeUndefined = setTypeUndefinedSmallJson;
+ f->setTypeBool = setTypeBoolSmallJson;
+ f->setTypeDouble = setTypeDoubleSmallJson;
+ f->setTypeInt = setTypeIntSmallJson;
+ f->setTypeString = setTypeStringSmallJson;
+ f->setTypeDict = setTypeDictSmallJson;
+ f->setTypeArray = setTypeArraySmallJson;
+ f->setTop = setTopSmallJson;
+ f->setTopBool = setTopBoolSmallJson;
+ f->setTopDouble = setTopDoubleSmallJson;
+ f->setTopInt = setTopIntSmallJson;
+ f->setTopString = setTopStringSmallJson;
+ f->setTopChar = setTopCharSmallJson;
+ f->setTopDict = setTopDictSmallJson;
+ f->setTopArray = setTopArraySmallJson;
+ f->setTopArrayc = setTopArraycSmallJson;
+ f->setTopSmallBool = setTopSmallBoolSmallJson;
+ f->setTopSmallDouble = setTopSmallDoubleSmallJson;
+ f->setTopSmallInt = setTopSmallIntSmallJson;
+ f->setTopSmallJson = setTopSmallJsonSmallJson;
+ f->setTopSmallString = setTopSmallStringSmallJson;
+ f->setTopNFree = setTopNFreeSmallJson;
+ f->setTopNFreeBool = setTopNFreeBoolSmallJson;
+ f->setTopNFreeDouble = setTopNFreeDoubleSmallJson;
+ f->setTopNFreeInt = setTopNFreeIntSmallJson;
+ f->setTopNFreeString = setTopNFreeStringSmallJson;
+ f->setTopNFreeDict = setTopNFreeDictSmallJson;
+ f->setTopNFreeArray = setTopNFreeArraySmallJson;
+ f->setTopNFreeArrayc = setTopNFreeArraycSmallJson;
+ f->setTopNFreeSmallBool = setTopNFreeSmallBoolSmallJson;
+ f->setTopNFreeSmallDouble = setTopNFreeSmallDoubleSmallJson;
+ f->setTopNFreeSmallInt = setTopNFreeSmallIntSmallJson;
+ f->setTopNFreeSmallJson = setTopNFreeSmallJsonSmallJson;
+ f->setTopNFreeSmallString = setTopNFreeSmallStringSmallJson;
+ f->fromArray = fromArraySmallJson;
+ f->fromArrayNFree = fromArrayNFreeSmallJson;
+ f->fromArrayDict = fromArrayDictSmallJson;
+ f->toArrayDict = toArrayDictSmallJson;
+ f->getTop = getTopSmallJson;
+ f->getTopUndefined = getTopUndefinedSmallJson;
+ f->getTopBool = getTopBoolSmallJson;
+ f->getTopBoolP = getTopBoolPSmallJson;
+ f->getTopDouble = getTopDoubleSmallJson;
+ f->getTopDoubleP = getTopDoublePSmallJson;
+ f->getTopInt = getTopIntSmallJson;
+ f->getTopIntP = getTopIntPSmallJson;
+ f->getTopInt32 = getTopInt32SmallJson;
+ f->getTopInt32P = getTopInt32PSmallJson;
+ f->getTopUint = getTopUintSmallJson;
+ f->getTopUintP = getTopUintPSmallJson;
+ f->getTopUint32 = getTopUint32SmallJson;
+ f->getTopUint32P = getTopUint32PSmallJson;
+ f->getTopS = getTopSSmallJson;
+ f->getTopDict = getTopDictSmallJson;
+ f->getTopArray = getTopArraySmallJson;
+ f->getTopSmallBool = getTopSmallBoolSmallJson;
+ f->getTopSmallDouble = getTopSmallDoubleSmallJson;
+ f->getTopSmallInt = getTopSmallIntSmallJson;
+ f->getTopSmallString = getTopSmallStringSmallJson;
+ f->keyIs = keyIsSmallJson;
+ f->keyIsS = keyIsSSmallJson;
+ f->makeKey = makeKeySmallJson;
+ f->iMakeKey = iMakeKeySmallJson;
+ f->bMakeKey = bMakeKeySmallJson;
+ f->bLMakeKey = bLMakeKeySmallJson;
+ f->makeKeyLen = makeKeyLenSmallJson;
+ f->set = setSmallJson;
+ f->setUndefined = setUndefinedSmallJson;
+ f->setBool = setBoolSmallJson;
+ f->setDouble = setDoubleSmallJson;
+ f->setInt = setIntSmallJson;
+ f->setS = setSSmallJson;
+ f->setChar = setCharSmallJson;
+ f->setDict = setDictSmallJson;
+ f->setArray = setArraySmallJson;
+ f->setArrayc = setArraycSmallJson;
+ f->setSmallBool = setSmallBoolSmallJson;
+ f->setSmallBytes = setSmallBytesSmallJson;
+ f->setSmallDouble = setSmallDoubleSmallJson;
+ f->setSmallInt = setSmallIntSmallJson;
+ f->setSmallJson = setSmallJsonSmallJson;
+ f->setSmallString = setSmallStringSmallJson;
+ f->setSmallContainer = setSmallContainerSmallJson;
+ f->setNFree = setNFreeSmallJson;
+ f->setNFreeUndefined = setNFreeUndefinedSmallJson;
+ f->setNFreeS = setNFreeSSmallJson;
+ f->setNFreeDict = setNFreeDictSmallJson;
+ f->setNFreeArray = setNFreeArraySmallJson;
+ f->setNFreeArrayc = setNFreeArraycSmallJson;
+ f->setNFreeSmallBool = setNFreeSmallBoolSmallJson;
+ f->setNFreeSmallBytes = setNFreeSmallBytesSmallJson;
+ f->setNFreeSmallDouble = setNFreeSmallDoubleSmallJson;
+ f->setNFreeSmallInt = setNFreeSmallIntSmallJson;
+ f->setNFreeSmallJson = setNFreeSmallJsonSmallJson;
+ f->setNFreeSmallString = setNFreeSmallStringSmallJson;
+ f->setNFreeSmallContainer = setNFreeSmallContainerSmallJson;
+ f->setPDict = setPDictSmallJson;
+ f->setPArray = setPArraySmallJson;
+ f->setPSmallJson = setPSmallJsonSmallJson;
+ f->setPSmallString = setPSmallStringSmallJson;
+ f->setNFreePDict = setNFreePDictSmallJson;
+ f->setNFreePArray = setNFreePArraySmallJson;
+ f->setNFreePSmallJson = setNFreePSmallJsonSmallJson;
+ f->setNFreePSmallString = setNFreePSmallStringSmallJson;
+ f->setAt = setAtSmallJson;
+ f->setAtUndefined = setAtUndefinedSmallJson;
+ f->setAtBool = setAtBoolSmallJson;
+ f->setAtDouble = setAtDoubleSmallJson;
+ f->setAtInt = setAtIntSmallJson;
+ f->setAtS = setAtSSmallJson;
+ f->setAtChar = setAtCharSmallJson;
+ f->setAtDict = setAtDictSmallJson;
+ f->setAtArray = setAtArraySmallJson;
+ f->setAtArrayc = setAtArraycSmallJson;
+ f->setAtSmallBool = setAtSmallBoolSmallJson;
+ f->setAtSmallBytes = setAtSmallBytesSmallJson;
+ f->setAtSmallDouble = setAtSmallDoubleSmallJson;
+ f->setAtSmallInt = setAtSmallIntSmallJson;
+ f->setAtSmallJson = setAtSmallJsonSmallJson;
+ f->setAtSmallString = setAtSmallStringSmallJson;
+ f->setAtSmallContainer = setAtSmallContainerSmallJson;
+ f->setAtNFree = setAtNFreeSmallJson;
+ f->setAtNFreeUndefined = setAtNFreeUndefinedSmallJson;
+ f->setAtNFreeS = setAtNFreeSSmallJson;
+ f->setAtNFreeDict = setAtNFreeDictSmallJson;
+ f->setAtNFreeArray = setAtNFreeArraySmallJson;
+ f->setAtNFreeArrayc = setAtNFreeArraycSmallJson;
+ f->setAtNFreeSmallBool = setAtNFreeSmallBoolSmallJson;
+ f->setAtNFreeSmallBytes = setAtNFreeSmallBytesSmallJson;
+ f->setAtNFreeSmallDouble = setAtNFreeSmallDoubleSmallJson;
+ f->setAtNFreeSmallInt = setAtNFreeSmallIntSmallJson;
+ f->setAtNFreeSmallJson = setAtNFreeSmallJsonSmallJson;
+ f->setAtNFreeSmallString = setAtNFreeSmallStringSmallJson;
+ f->setAtNFreeSmallContainer = setAtNFreeSmallContainerSmallJson;
+ f->setPAtDict = setPAtDictSmallJson;
+ f->setPAtArray = setPAtArraySmallJson;
+ f->setPAtSmallJson = setPAtSmallJsonSmallJson;
+ f->setPAtSmallString = setPAtSmallStringSmallJson;
+ f->setPAtNFreeDict = setPAtNFreeDictSmallJson;
+ f->setPAtNFreeArray = setPAtNFreeArraySmallJson;
+ f->setPAtNFreeSmallJson = setPAtNFreeSmallJsonSmallJson;
+ f->setPAtNFreeSmallString = setPAtNFreeSmallStringSmallJson;
+ f->get = getSmallJson;
+ f->getUndefined = getUndefinedSmallJson;
+ f->getBool = getBoolSmallJson;
+ f->getBoolP = getBoolPSmallJson;
+ f->getDouble = getDoubleSmallJson;
+ f->getDoubleP = getDoublePSmallJson;
+ f->getInt = getIntSmallJson;
+ f->getIntP = getIntPSmallJson;
+ f->getInt32 = getInt32SmallJson;
+ f->getInt32P = getInt32PSmallJson;
+ f->getUint = getUintSmallJson;
+ f->getUintP = getUintPSmallJson;
+ f->getUint32 = getUint32SmallJson;
+ f->getUint32P = getUint32PSmallJson;
+ f->getS = getSSmallJson;
+ f->getDict = getDictSmallJson;
+ f->getArray = getArraySmallJson;
+ f->getSmallBool = getSmallBoolSmallJson;
+ f->getSmallBytes = getSmallBytesSmallJson;
+ f->getSmallDouble = getSmallDoubleSmallJson;
+ f->getSmallInt = getSmallIntSmallJson;
+ f->getSmallJson = getSmallJsonSmallJson;
+ f->getSmallString = getSmallStringSmallJson;
+ f->getVoid = getVoidSmallJson;
+ f->getSmallContainer = getSmallContainerSmallJson;
+ f->getNDup = getNDupSmallJson;
+ f->getNDupUndefined = getNDupUndefinedSmallJson;
+ f->getNDupBool = getNDupBoolSmallJson;
+ f->getNDupDouble = getNDupDoubleSmallJson;
+ f->getNDupInt = getNDupIntSmallJson;
+ f->getNDupInt32 = getNDupInt32SmallJson;
+ f->getNDupUint = getNDupUintSmallJson;
+ f->getNDupUint32 = getNDupUint32SmallJson;
+ f->getNDupS = getNDupSSmallJson;
+ f->getNDupDict = getNDupDictSmallJson;
+ f->getNDupArray = getNDupArraySmallJson;
+ f->getNDupSmallBool = getNDupSmallBoolSmallJson;
+ f->getNDupSmallBytes = getNDupSmallBytesSmallJson;
+ f->getNDupSmallDouble = getNDupSmallDoubleSmallJson;
+ f->getNDupSmallInt = getNDupSmallIntSmallJson;
+ f->getNDupSmallJson = getNDupSmallJsonSmallJson;
+ f->getNDupSmallString = getNDupSmallStringSmallJson;
+ f->getNDupVoid = getNDupVoidSmallJson;
+ f->getNDupSmallContainer = getNDupSmallContainerSmallJson;
+ f->getAt = getAtSmallJson;
+ f->getAtUndefined = getAtUndefinedSmallJson;
+ f->getAtBool = getAtBoolSmallJson;
+ f->getAtBoolP = getAtBoolPSmallJson;
+ f->getAtDouble = getAtDoubleSmallJson;
+ f->getAtDoubleP = getAtDoublePSmallJson;
+ f->getAtInt = getAtIntSmallJson;
+ f->getAtIntP = getAtIntPSmallJson;
+ f->getAtInt32 = getAtInt32SmallJson;
+ f->getAtInt32P = getAtInt32PSmallJson;
+ f->getAtUint = getAtUintSmallJson;
+ f->getAtUintP = getAtUintPSmallJson;
+ f->getAtUint32 = getAtUint32SmallJson;
+ f->getAtUint32P = getAtUint32PSmallJson;
+ f->getAtS = getAtSSmallJson;
+ f->getAtDict = getAtDictSmallJson;
+ f->getAtArray = getAtArraySmallJson;
+ f->getAtSmallBool = getAtSmallBoolSmallJson;
+ f->getAtSmallBytes = getAtSmallBytesSmallJson;
+ f->getAtSmallDouble = getAtSmallDoubleSmallJson;
+ f->getAtSmallInt = getAtSmallIntSmallJson;
+ f->getAtSmallJson = getAtSmallJsonSmallJson;
+ f->getAtSmallString = getAtSmallStringSmallJson;
+ f->getAtVoid = getAtVoidSmallJson;
+ f->getAtSmallContainer = getAtSmallContainerSmallJson;
+ f->getAtNDup = getAtNDupSmallJson;
+ f->getAtNDupUndefined = getAtNDupUndefinedSmallJson;
+ f->getAtNDupBool = getAtNDupBoolSmallJson;
+ f->getAtNDupDouble = getAtNDupDoubleSmallJson;
+ f->getAtNDupInt = getAtNDupIntSmallJson;
+ f->getAtNDupInt32 = getAtNDupInt32SmallJson;
+ f->getAtNDupUint = getAtNDupUintSmallJson;
+ f->getAtNDupUint32 = getAtNDupUint32SmallJson;
+ f->getAtNDupS = getAtNDupSSmallJson;
+ f->getAtNDupDict = getAtNDupDictSmallJson;
+ f->getAtNDupArray = getAtNDupArraySmallJson;
+ f->getAtNDupSmallBool = getAtNDupSmallBoolSmallJson;
+ f->getAtNDupSmallBytes = getAtNDupSmallBytesSmallJson;
+ f->getAtNDupSmallDouble = getAtNDupSmallDoubleSmallJson;
+ f->getAtNDupSmallInt = getAtNDupSmallIntSmallJson;
+ f->getAtNDupSmallJson = getAtNDupSmallJsonSmallJson;
+ f->getAtNDupSmallString = getAtNDupSmallStringSmallJson;
+ f->getAtNDupVoid = getAtNDupVoidSmallJson;
+ f->getAtNDupSmallContainer = getAtNDupSmallContainerSmallJson;
+ f->getNum = getNumSmallJson;
+ f->getNumAt = getNumAtSmallJson;
+ f->delElem = delElemSmallJson;
+ f->del = delSmallJson;
+ f->delElemIndex = delElemIndexSmallJson;
+ f->push = pushSmallJson;
+ f->pushUndefined = pushUndefinedSmallJson;
+ f->pushBool = pushBoolSmallJson;
+ f->pushDouble = pushDoubleSmallJson;
+ f->pushInt = pushIntSmallJson;
+ f->pushS = pushSSmallJson;
+ f->pushChar = pushCharSmallJson;
+ f->pushDict = pushDictSmallJson;
+ f->pushArray = pushArraySmallJson;
+ f->pushArrayc = pushArraycSmallJson;
+ f->pushSmallBool = pushSmallBoolSmallJson;
+ f->pushSmallBytes = pushSmallBytesSmallJson;
+ f->pushSmallDouble = pushSmallDoubleSmallJson;
+ f->pushSmallInt = pushSmallIntSmallJson;
+ f->pushSmallJson = pushSmallJsonSmallJson;
+ f->pushSmallString = pushSmallStringSmallJson;
+ f->pushSmallContainer = pushSmallContainerSmallJson;
+ f->pushNFree = pushNFreeSmallJson;
+ f->pushNFreeUndefined = pushNFreeUndefinedSmallJson;
+ f->pushNFreeS = pushNFreeSSmallJson;
+ f->pushNFreeDict = pushNFreeDictSmallJson;
+ f->pushNFreeArray = pushNFreeArraySmallJson;
+ f->pushNFreeArrayc = pushNFreeArraycSmallJson;
+ f->pushNFreeSmallBool = pushNFreeSmallBoolSmallJson;
+ f->pushNFreeSmallBytes = pushNFreeSmallBytesSmallJson;
+ f->pushNFreeSmallDouble = pushNFreeSmallDoubleSmallJson;
+ f->pushNFreeSmallInt = pushNFreeSmallIntSmallJson;
+ f->pushNFreeSmallJson = pushNFreeSmallJsonSmallJson;
+ f->pushNFreeSmallString = pushNFreeSmallStringSmallJson;
+ f->pushNFreeSmallContainer = pushNFreeSmallContainerSmallJson;
+ f->pushMany = pushManySmallJson;
+ f->pushManyS = pushManySSmallJson;
+ f->catSt = pushManySSmallJson;
+ f->pushNFreeMany = pushNFreeManySmallJson;
+ f->pushNFreeManyS = pushNFreeManySSmallJson;
+ f->pop = popSmallJson;
+ f->popUndefined = popUndefinedSmallJson;
+ f->popBool = popBoolSmallJson;
+ f->popDouble = popDoubleSmallJson;
+ f->popInt = popIntSmallJson;
+ f->popInt32 = popInt32SmallJson;
+ f->popUint = popUintSmallJson;
+ f->popUint32 = popUint32SmallJson;
+ f->popS = popSSmallJson;
+ f->popDict = popDictSmallJson;
+ f->popArray = popArraySmallJson;
+ f->popSmallBool = popSmallBoolSmallJson;
+ f->popSmallBytes = popSmallBytesSmallJson;
+ f->popSmallDouble = popSmallDoubleSmallJson;
+ f->popSmallInt = popSmallIntSmallJson;
+ f->popSmallJson = popSmallJsonSmallJson;
+ f->popSmallString = popSmallStringSmallJson;
+ f->popVoid = popVoidSmallJson;
+ f->popSmallContainer = popSmallContainerSmallJson;
+ f->popNum = popNumSmallJson;
+ f->prepend = prependSmallJson;
+ f->prependUndefined = prependUndefinedSmallJson;
+ f->prependBool = prependBoolSmallJson;
+ f->prependDouble = prependDoubleSmallJson;
+ f->prependInt = prependIntSmallJson;
+ f->prependS = prependSSmallJson;
+ f->prependChar = prependCharSmallJson;
+ f->prependDict = prependDictSmallJson;
+ f->prependArray = prependArraySmallJson;
+ f->prependArrayc = prependArraycSmallJson;
+ f->prependSmallBool = prependSmallBoolSmallJson;
+ f->prependSmallBytes = prependSmallBytesSmallJson;
+ f->prependSmallDouble = prependSmallDoubleSmallJson;
+ f->prependSmallInt = prependSmallIntSmallJson;
+ f->prependSmallJson = prependSmallJsonSmallJson;
+ f->prependSmallString = prependSmallStringSmallJson;
+ f->prependSmallContainer = prependSmallContainerSmallJson;
+ f->prependNFree = prependNFreeSmallJson;
+ f->prependNFreeUndefined = prependNFreeUndefinedSmallJson;
+ f->prependNFreeS = prependNFreeSSmallJson;
+ f->prependNFreeDict = prependNFreeDictSmallJson;
+ f->prependNFreeArray = prependNFreeArraySmallJson;
+ f->prependNFreeArrayc = prependNFreeArraycSmallJson;
+ f->prependNFreeSmallBool = prependNFreeSmallBoolSmallJson;
+ f->prependNFreeSmallBytes = prependNFreeSmallBytesSmallJson;
+ f->prependNFreeSmallDouble = prependNFreeSmallDoubleSmallJson;
+ f->prependNFreeSmallInt = prependNFreeSmallIntSmallJson;
+ f->prependNFreeSmallJson = prependNFreeSmallJsonSmallJson;
+ f->prependNFreeSmallString = prependNFreeSmallStringSmallJson;
+ f->prependNFreeSmallContainer = prependNFreeSmallContainerSmallJson;
+ f->dequeue = dequeueSmallJson;
+ f->dequeueUndefined = dequeueUndefinedSmallJson;
+ f->dequeueBool = dequeueBoolSmallJson;
+ f->dequeueDouble = dequeueDoubleSmallJson;
+ f->dequeueInt = dequeueIntSmallJson;
+ f->dequeueInt32 = dequeueInt32SmallJson;
+ f->dequeueUint = dequeueUintSmallJson;
+ f->dequeueUint32 = dequeueUint32SmallJson;
+ f->dequeueS = dequeueSSmallJson;
+ f->dequeueDict = dequeueDictSmallJson;
+ f->dequeueArray = dequeueArraySmallJson;
+ f->dequeueSmallBool = dequeueSmallBoolSmallJson;
+ f->dequeueSmallBytes = dequeueSmallBytesSmallJson;
+ f->dequeueSmallDouble = dequeueSmallDoubleSmallJson;
+ f->dequeueSmallInt = dequeueSmallIntSmallJson;
+ f->dequeueSmallJson = dequeueSmallJsonSmallJson;
+ f->dequeueSmallString = dequeueSmallStringSmallJson;
+ f->dequeueVoid = dequeueVoidSmallJson;
+ f->dequeueSmallContainer = dequeueSmallContainerSmallJson;
+ f->dequeueNum = dequeueNumSmallJson;
+ f->reverse = reverseSmallJson;
+ f->cat = catSmallJson;
+ f->mergeDict = mergeDictSmallJson;
+ f->mergeDictNSmash = mergeDictNSmashSmallJson;
+ f->merge = mergeSmallJson;
+ f->mergeNSmash = mergeNSmashSmallJson;
+ f->append = appendSmallJson;
+ f->appendNSmash = appendNSmashSmallJson;
// not used, included in mergeSmallJson
- /* f->appendSmallJson = appendSmallJsonSmallJson */
- /* f->appendSmallJsonNSmash = appendSmallJsonNSmashSmallJson */
- f->appendArray = appendArraySmallJson;
- f->appendNSmashArray = appendNSmashArraySmallJson;
- f->shift = shiftSmallJson; {
- f->shiftNSmash = shiftNSmashSmallJson; {
- f->shiftSmallJson = shiftSmallJsonSmallJson; {
- f->shiftSmallJsonNSmash = shiftSmallJsonNSmashSmallJson; {
- f->add = addSmallJson;
- f->addJson = addJsonSmallJson;
- f->slice = sliceSmallJson;
- f->copy = copySmallJson;
- f->insert = insertSmallJson;
- f->insertNSmash = insertNSmashSmallJson;
- f->insertJson = insertJsonSmallJson;
- f->insertJsonNSmash = insertJsonNSmashSmallJson;
- f->insertString = insertStringSmallJson;
- f->insertS = insertSSmallJson;
- f->insertNFreeString = insertNFreeStringSmallJson;
- f->insertSNFree = insertSNFreeSmallJson;
- f->inject = injectSmallJson;
- f->injectUndefined = injectUndefinedSmallJson;
- f->injectBool = injectBoolSmallJson;
- f->injectDouble = injectDoubleSmallJson;
- f->injectInt = injectIntSmallJson;
- f->injectS = injectSSmallJson;
- f->injectChar = injectCharSmallJson;
- f->injectDict = injectDictSmallJson;
- f->injectArray = injectArraySmallJson;
- f->injectArrayc = injectArraycSmallJson;
- f->injectSmallBool = injectSmallBoolSmallJson;
- f->injectSmallBytes = injectSmallBytesSmallJson;
- f->injectSmallDouble = injectSmallDoubleSmallJson;
- f->injectSmallInt = injectSmallIntSmallJson;
- f->injectSmallJson = injectSmallJsonSmallJson;
- f->injectSmallString = injectSmallStringSmallJson;
- f->injectSmallContainer = injectSmallContainerSmallJson;
- f->injectNFree = injectNFreeSmallJson;
- f->injectNFreeUndefined = injectNFreeUndefinedSmallJson;
- f->injectNFreeS = injectNFreeSSmallJson;
- f->injectNFreeDict = injectNFreeDictSmallJson;
- f->injectNFreeArray = injectNFreeArraySmallJson;
- f->injectNFreeArrayc = injectNFreeArraycSmallJson;
- f->injectNFreeSmallBool = injectNFreeSmallBoolSmallJson;
- f->injectNFreeSmallBytes = injectNFreeSmallBytesSmallJson;
- f->injectNFreeSmallDouble = injectNFreeSmallDoubleSmallJson;
- f->injectNFreeSmallInt = injectNFreeSmallIntSmallJson;
- f->injectNFreeSmallJson = injectNFreeSmallJsonSmallJson;
- f->injectNFreeSmallString = injectNFreeSmallStringSmallJson;
- f->injectNFreeSmallContainer = injectNFreeSmallContainerSmallJson;
- f->uniq = uniqSmallJson;
- f->icUniq = icUniqSmallJson;
- f->uniqChar = uniqCharSmallJson;
- f->icUniqChar = icUniqCharSmallJson;
- f->sort = sortSmallJson;
- f->sortF = sortFSmallJson;
- f->icSort = icSortSmallJson;
- f->has = hasSmallJson;
- f->hasUndefined = hasUndefinedSmallJson;
- f->hasBool = hasBoolSmallJson;
- f->hasDouble = hasDoubleSmallJson;
- f->hasInt = hasIntSmallJson;
- f->hasS = hasSSmallJson;
- f->hasChar = hasCharSmallJson;
- f->hasDict = hasDictSmallJson;
- f->hasArray = hasArraySmallJson;
- f->hasArrayc = hasArraycSmallJson;
- f->hasSmallBool = hasSmallBoolSmallJson;
- f->hasSmallBytes = hasSmallBytesSmallJson;
- f->hasSmallDouble = hasSmallDoubleSmallJson;
- f->hasSmallInt = hasSmallIntSmallJson;
- f->hasSmallJson = hasSmallJsonSmallJson;
- f->hasSmallString = hasSmallStringSmallJson;
- f->hasSmallContainer = hasSmallContainerSmallJson;
- f->find = findSmallJson;
- f->findChar = findCharSmallJson;
- f->findSmallString = findSmallStringSmallJson;
- f->findJson = findJsonSmallJson;
- f->indexOf = indexOfSmallJson;
- f->indexOfUndefined = indexOfUndefinedSmallJson;
- f->indexOfBool = indexOfBoolSmallJson;
- f->indexOfDouble = indexOfDoubleSmallJson;
- f->indexOfInt = indexOfIntSmallJson;
- f->indexOfS = indexOfSSmallJson;
- f->indexOfChar = indexOfCharSmallJson;
- f->indexOfDict = indexOfDictSmallJson;
- f->indexOfArray = indexOfArraySmallJson;
- f->indexOfArrayc = indexOfArraycSmallJson;
- f->indexOfSmallBool = indexOfSmallBoolSmallJson;
- f->indexOfSmallBytes = indexOfSmallBytesSmallJson;
- f->indexOfSmallDouble = indexOfSmallDoubleSmallJson;
- f->indexOfSmallInt = indexOfSmallIntSmallJson;
- f->indexOfSmallJson = indexOfSmallJsonSmallJson;
- f->indexOfSmallString = indexOfSmallStringSmallJson;
- f->indexOfSmallContainer = indexOfSmallContainerSmallJson;
- f->binarySearch = binarySearchSmallJson;
- f->binarySearchUndefined = binarySearchUndefinedSmallJson;
- f->binarySearchBool = binarySearchBoolSmallJson;
- f->binarySearchDouble = binarySearchDoubleSmallJson;
- f->binarySearchInt = binarySearchIntSmallJson;
- f->binarySearchS = binarySearchSSmallJson;
- f->binarySearchChar = binarySearchCharSmallJson;
- f->binarySearchDict = binarySearchDictSmallJson;
- f->binarySearchArray = binarySearchArraySmallJson;
- f->binarySearchArrayc = binarySearchArraycSmallJson;
- f->binarySearchSmallBool = binarySearchSmallBoolSmallJson;
- f->binarySearchSmallBytes = binarySearchSmallBytesSmallJson;
- f->binarySearchSmallDouble = binarySearchSmallDoubleSmallJson;
- f->binarySearchSmallInt = binarySearchSmallIntSmallJson;
- f->binarySearchSmallJson = binarySearchSmallJsonSmallJson;
- f->binarySearchSmallString = binarySearchSmallStringSmallJson;
- f->binarySearchSmallContainer = binarySearchSmallContainerSmallJson;
- f->icHas = icHasSmallJson;
- f->icHasS = icHasSSmallJson;
- f->icHasChar = icHasCharSmallJson;
- f->icHasDict = icHasDictSmallJson;
- f->icHasArray = icHasArraySmallJson;
- f->icHasArrayc = icHasArraycSmallJson;
- f->icHasSmallString = icHasSmallStringSmallJson;
- f->icFind = icFindSmallJson;
- f->icFindChar = icFindCharSmallJson;
- f->icFindSmallString = icFindSmallStringSmallJson;
- f->icFindJson = icFindJsonSmallJson;
- f->icIndexOf = icIndexOfSmallJson;
- f->icIndexOfS = icIndexOfSSmallJson;
- f->icIndexOfChar = icIndexOfCharSmallJson;
- f->icIndexOfDict = icIndexOfDictSmallJson;
- f->icIndexOfArray = icIndexOfArraySmallJson;
- f->icIndexOfArrayc = icIndexOfArraycSmallJson;
- f->icIndexOfSmallString = icIndexOfSmallStringSmallJson;
- f->icBinarySearch = icBinarySearchSmallJson;
- f->icBinarySearchS = icBinarySearchSSmallJson;
- f->icBinarySearchChar = icBinarySearchCharSmallJson;
- f->icBinarySearchDict = icBinarySearchDictSmallJson;
- f->icBinarySearchArray = icBinarySearchArraySmallJson;
- f->icBinarySearchArrayc = icBinarySearchArraycSmallJson;
- f->icBinarySearchSmallString = icBinarySearchSmallStringSmallJson;
- f->keyBy = keyBySmallJson;
- f->keyByUndefined = keyByUndefinedSmallJson;
- f->keyByBool = keyByBoolSmallJson;
- f->keyByDouble = keyByDoubleSmallJson;
- f->keyByInt = keyByIntSmallJson;
- f->keyByS = keyBySSmallJson;
- f->keyByChar = keyByCharSmallJson;
- f->keyByDict = keyByDictSmallJson;
- f->keyByArray = keyByArraySmallJson;
- f->keyByArrayc = keyByArraycSmallJson;
- f->keyBySmallBool = keyBySmallBoolSmallJson;
- f->keyBySmallBytes = keyBySmallBytesSmallJson;
- f->keyBySmallDouble = keyBySmallDoubleSmallJson;
- f->keyBySmallInt = keyBySmallIntSmallJson;
- f->keyBySmallJson = keyBySmallJsonSmallJson;
- f->keyBySmallString = keyBySmallStringSmallJson;
- f->keyBySmallContainer = keyBySmallContainerSmallJson;
- f->icKeyBy = icKeyBySmallJson;
- f->icKeyByS = icKeyBySSmallJson;
- f->icKeyByChar = icKeyByCharSmallJson;
- f->icKeyByDict = icKeyByDictSmallJson;
- f->icKeyByArray = icKeyByArraySmallJson;
- f->icKeyByArrayc = icKeyByArraycSmallJson;
- f->icKeyBySmallString = icKeyBySmallStringSmallJson;
- f->replace = replaceSmallJson;
- f->replaceCharS = replaceCharSSmallJson;
- f->replaceSChar = replaceSCharSmallJson;
- f->replaceCharChar = replaceCharCharSmallJson;
- f->replaceSmallStringSmallString = replaceSmallStringSmallStringSmallJson;
- f->replaceSmallStringS = replaceSmallStringSSmallJson;
- f->replaceSmallStringChar = replaceSmallStringCharSmallJson;
- f->replaceSSmallString = replaceSSmallStringSmallJson;
- f->replaceCharSmallString = replaceCharSmallStringSmallJson;
- f->replaceJsonJson = replaceJsonJsonSmallJson;
- f->replaceJsonSmallString = replaceJsonSmallStringSmallJson;
- f->replaceJsonS = replaceJsonSSmallJson;
- f->replaceJsonChar = replaceJsonCharSmallJson;
- f->replaceSmallStringJson = replaceSmallStringJsonSmallJson;
- f->replaceSJson = replaceSJsonSmallJson;
- f->replaceCharJson = replaceCharJsonSmallJson;
- f->replaceMany = replaceManySmallJson;
- f->icReplace = icReplaceSmallJson;
- f->icReplaceCharS = icReplaceCharSSmallJson;
- f->icReplaceSChar = icReplaceSCharSmallJson;
- f->icReplaceCharChar = icReplaceCharCharSmallJson;
- f->icReplaceSmallStringSmallString = icReplaceSmallStringSmallStringSmallJson;
- f->icReplaceSmallStringS = icReplaceSmallStringSSmallJson;
- f->icReplaceSmallStringChar = icReplaceSmallStringCharSmallJson;
- f->icReplaceSSmallString = icReplaceSSmallStringSmallJson;
- f->icReplaceCharSmallString = icReplaceCharSmallStringSmallJson;
- f->icReplaceJsonJson = icReplaceJsonJsonSmallJson;
- f->icReplaceJsonSmallString = icReplaceJsonSmallStringSmallJson;
- f->icReplaceJsonS = icReplaceJsonSSmallJson;
- f->icReplaceJsonChar = icReplaceJsonCharSmallJson;
- f->icReplaceSmallStringJson = icReplaceSmallStringJsonSmallJson;
- f->icReplaceSJson = icReplaceSJsonSmallJson;
- f->icReplaceCharJson = icReplaceCharJsonSmallJson;
- f->icReplaceMany = icReplaceManySmallJson;
- f->equalSmallArray = equalSmallJsonSmallArray;
- f->equalArray = equalSmallJsonArray;
- f->equalBase = equalSmallJsonBase;
- f->equalCha = equalSmallJsonCha;
- f->equalChar = equalSmallJsonChar;
- f->equalBool = equalSmallJsonBool;
- f->equalDouble = equalSmallJsonDouble;
- f->equalInt64 = equalSmallJsonInt64;
- f->equalInt32 = equalSmallJsonInt32;
- f->equalUint32 = equalSmallJsonUint32;
- f->equalUint64 = equalSmallJsonUint64;
- f->equalSmallBool = equalSmallJsonSmallBool;
- f->equalSmallBytes = equalSmallJsonSmallBytes;
- f->equalSmallDouble = equalSmallJsonSmallDouble;
- f->equalSmallInt = equalSmallJsonSmallInt;
- f->equalSmallJson = equalSmallJsonSmallJson;
- f->equalSmallString = equalSmallJsonSmallString;
- f->equalSmallDict = equalSmallJsonSmallDict;;
- f->icEqualSmallArray = icEqualSmallJsonSmallArray;
- f->icEqualArray = icEqualSmallJsonArray;
- f->icEqualBase = icEqualSmallJsonBase;
- f->icEqualSmallDict = icEqualSmallJsonSmallDict;;
- f->icEqualSmallJson = icEqualSmallJsonSmallJson;
- f->icEqualSmallString = icEqualSmallJsonSmallString;
- f->icEqualS = icEqualSSmallJson;
- f->icEqualChar = icEqualCharSmallJson;
- f->equalIS = equalISSmallJson;
- f->equalIChar = equalICharSmallJson;
- f->equalIJson = equalIJsonSmallJson;
- f->equalISmallString = equalISmallStringSmallJson;
- f->startsWithS = startsWithSSmallJson;
- f->startsWithChar = startsWithCharSmallJson;
- f->startsWithSmallString = startsWithSmallStringSmallJson;
- f->startsWithJson = startsWithJsonSmallJson;
- f->endsWithS = endsWithSSmallJson;
- f->endsWithChar = endsWithCharSmallJson;
- f->endsWithSmallString = endsWithSmallStringSmallJson;
- f->endsWithJson = endsWithJsonSmallJson;
- f->countS = countSSmallJson;
- f->countChar = countCharSmallJson;
- f->countSmallString = countSmallStringSmallJson;
- f->countJson = countJsonSmallJson;
- f->icStartsWithS = icStartsWithSSmallJson;
- f->icStartsWithChar = icStartsWithCharSmallJson;
- f->icStartsWithSmallString = icStartsWithSmallStringSmallJson;
- f->icStartsWithJson = icStartsWithJsonSmallJson;
- f->icEndsWithS = icEndsWithSSmallJson;
- f->icEndsWithChar = icEndsWithCharSmallJson;
- f->icEndsWithSmallString = icEndsWithSmallStringSmallJson;
- f->icEndsWithJson = icEndsWithJsonSmallJson;
- f->icCountS = icCountSSmallJson;
- f->icCountChar = icCountCharSmallJson;
- f->icCountSmallString = icCountSmallStringSmallJson;
- f->icCountJson = icCountJsonSmallJson;
- f->isNumber = isNumberSmallJson;
- f->isInt = isIntSmallJson;
- f->parseInt = parseIntSmallJson;
- f->parseDouble = parseDoubleSmallJson;
- f->intTo = intToSmallJson;
- f->doubleTo = doubleToSmallJson;
- f->len = lenSmallJson;
- f->upper = upperSmallJson;
- f->lower = lowerSmallJson;
- f->trim = trimSmallJson;
- f->lTrim = lTrimSmallJson;
- f->rTrim = rTrimSmallJson;
- f->keys = keysSmallJson;
- f->keysSmallString = keysSmallStringSmallJson;
- f->values = valuesSmallJson;
- f->compact = compactSmallJson;
- f->empty = emptySmallJson;
- f->isEmpty = isEmptySmallJson;
- f->isBlank = isBlankSmallJson;
- f->forEach = forEachSmallJsonF; {
+ /* f->appendSmallJson = appendSmallJsonSmallJson */
+ /* f->appendSmallJsonNSmash = appendSmallJsonNSmashSmallJson */
+ f->appendArray = appendArraySmallJson;
+ f->appendNSmashArray = appendNSmashArraySmallJson;
+ f->shift = shiftSmallJson; {
+ f->shiftNSmash = shiftNSmashSmallJson; {
+ f->shiftSmallJson = shiftSmallJsonSmallJson; {
+ f->shiftSmallJsonNSmash = shiftSmallJsonNSmashSmallJson; {
+ f->add = addSmallJson;
+ f->addJson = addJsonSmallJson;
+ f->slice = sliceSmallJson;
+ f->crop = cropSmallJson;
+ f->cropS = cropSSmallJson;;
+ f->cropSmallString = cropSmallStringSmallJson;;
+ f->cropElemAt = cropElemAtSmallJson;
+ f->cropElemAtUndefined = cropElemAtUndefinedSmallJson;
+ f->cropElemAtBool = cropElemAtBoolSmallJson;
+ f->cropElemAtDouble = cropElemAtDoubleSmallJson;
+ f->cropElemAtInt = cropElemAtIntSmallJson;
+ f->cropElemAtInt32 = cropElemAtInt32SmallJson;
+ f->cropElemAtUint = cropElemAtUintSmallJson;
+ f->cropElemAtUint32 = cropElemAtUint32SmallJson;
+ f->cropElemAtS = cropElemAtSSmallJson;
+ f->cropElemAtChar = cropElemAtCharSmallJson;;
+ f->cropElemAtDict = cropElemAtDictSmallJson;
+ f->cropElemAtArray = cropElemAtArraySmallJson;
+ f->cropElemAtSmallBool = cropElemAtSmallBoolSmallJson;
+ f->cropElemAtSmallBytes = cropElemAtSmallBytesSmallJson;
+ f->cropElemAtSmallDouble = cropElemAtSmallDoubleSmallJson;
+ f->cropElemAtSmallInt = cropElemAtSmallIntSmallJson;
+ f->cropElemAtSmallJson = cropElemAtSmallJsonSmallJson;
+ f->cropElemAtSmallString = cropElemAtSmallStringSmallJson;
+ f->cropElemAtVoid = cropElemAtVoidSmallJson;
+ f->cropElemAtSmallContainer = cropElemAtSmallContainerSmallJson;
+ f->cropElemKey = cropElemKeySmallJson;
+ f->cropElemKeyUndefined = cropElemKeyUndefinedSmallJson;
+ f->cropElemKeyBool = cropElemKeyBoolSmallJson;
+ f->cropElemKeyDouble = cropElemKeyDoubleSmallJson;
+ f->cropElemKeyInt = cropElemKeyIntSmallJson;
+ f->cropElemKeyInt32 = cropElemKeyInt32SmallJson;
+ f->cropElemKeyUint = cropElemKeyUintSmallJson;
+ f->cropElemKeyUint32 = cropElemKeyUint32SmallJson;
+ f->cropElemKeyS = cropElemKeySSmallJson;
+ f->cropElemKeyDict = cropElemKeyDictSmallJson;
+ f->cropElemKeyArray = cropElemKeyArraySmallJson;
+ f->cropElemKeySmallBool = cropElemKeySmallBoolSmallJson;
+ f->cropElemKeySmallBytes = cropElemKeySmallBytesSmallJson;
+ f->cropElemKeySmallDouble = cropElemKeySmallDoubleSmallJson;
+ f->cropElemKeySmallInt = cropElemKeySmallIntSmallJson;
+ f->cropElemKeySmallJson = cropElemKeySmallJsonSmallJson;
+ f->cropElemKeySmallString = cropElemKeySmallStringSmallJson;
+ f->cropElemKeyVoid = cropElemKeyVoidSmallJson;
+ f->cropElemKeySmallContainer = cropElemKeySmallContainerSmallJson;
+ f->copy = copySmallJson;
+ f->insert = insertSmallJson;
+ f->insertNSmash = insertNSmashSmallJson;
+ f->insertJson = insertJsonSmallJson;
+ f->insertJsonNSmash = insertJsonNSmashSmallJson;
+ f->insertString = insertStringSmallJson;
+ f->insertS = insertSSmallJson;
+ f->insertNFreeString = insertNFreeStringSmallJson;
+ f->insertSNFree = insertSNFreeSmallJson;
+ f->inject = injectSmallJson;
+ f->injectUndefined = injectUndefinedSmallJson;
+ f->injectBool = injectBoolSmallJson;
+ f->injectDouble = injectDoubleSmallJson;
+ f->injectInt = injectIntSmallJson;
+ f->injectS = injectSSmallJson;
+ f->injectChar = injectCharSmallJson;
+ f->injectDict = injectDictSmallJson;
+ f->injectArray = injectArraySmallJson;
+ f->injectArrayc = injectArraycSmallJson;
+ f->injectSmallBool = injectSmallBoolSmallJson;
+ f->injectSmallBytes = injectSmallBytesSmallJson;
+ f->injectSmallDouble = injectSmallDoubleSmallJson;
+ f->injectSmallInt = injectSmallIntSmallJson;
+ f->injectSmallJson = injectSmallJsonSmallJson;
+ f->injectSmallString = injectSmallStringSmallJson;
+ f->injectSmallContainer = injectSmallContainerSmallJson;
+ f->injectNFree = injectNFreeSmallJson;
+ f->injectNFreeUndefined = injectNFreeUndefinedSmallJson;
+ f->injectNFreeS = injectNFreeSSmallJson;
+ f->injectNFreeDict = injectNFreeDictSmallJson;
+ f->injectNFreeArray = injectNFreeArraySmallJson;
+ f->injectNFreeArrayc = injectNFreeArraycSmallJson;
+ f->injectNFreeSmallBool = injectNFreeSmallBoolSmallJson;
+ f->injectNFreeSmallBytes = injectNFreeSmallBytesSmallJson;
+ f->injectNFreeSmallDouble = injectNFreeSmallDoubleSmallJson;
+ f->injectNFreeSmallInt = injectNFreeSmallIntSmallJson;
+ f->injectNFreeSmallJson = injectNFreeSmallJsonSmallJson;
+ f->injectNFreeSmallString = injectNFreeSmallStringSmallJson;
+ f->injectNFreeSmallContainer = injectNFreeSmallContainerSmallJson;
+ f->uniq = uniqSmallJson;
+ f->icUniq = icUniqSmallJson;
+ f->uniqChar = uniqCharSmallJson;
+ f->icUniqChar = icUniqCharSmallJson;
+ f->sort = sortSmallJson;
+ f->sortF = sortFSmallJson;
+ f->icSort = icSortSmallJson;
+ f->has = hasSmallJson;
+ f->hasUndefined = hasUndefinedSmallJson;
+ f->hasBool = hasBoolSmallJson;
+ f->hasDouble = hasDoubleSmallJson;
+ f->hasInt = hasIntSmallJson;
+ f->hasS = hasSSmallJson;
+ f->hasChar = hasCharSmallJson;
+ f->hasDict = hasDictSmallJson;
+ f->hasArray = hasArraySmallJson;
+ f->hasArrayc = hasArraycSmallJson;
+ f->hasSmallBool = hasSmallBoolSmallJson;
+ f->hasSmallBytes = hasSmallBytesSmallJson;
+ f->hasSmallDouble = hasSmallDoubleSmallJson;
+ f->hasSmallInt = hasSmallIntSmallJson;
+ f->hasSmallJson = hasSmallJsonSmallJson;
+ f->hasSmallString = hasSmallStringSmallJson;
+ f->hasSmallContainer = hasSmallContainerSmallJson;
+ f->find = findSmallJson;
+ f->findChar = findCharSmallJson;
+ f->findSmallString = findSmallStringSmallJson;
+ f->findJson = findJsonSmallJson;
+ f->indexOf = indexOfSmallJson;
+ f->indexOfUndefined = indexOfUndefinedSmallJson;
+ f->indexOfBool = indexOfBoolSmallJson;
+ f->indexOfDouble = indexOfDoubleSmallJson;
+ f->indexOfInt = indexOfIntSmallJson;
+ f->indexOfS = indexOfSSmallJson;
+ f->indexOfChar = indexOfCharSmallJson;
+ f->indexOfDict = indexOfDictSmallJson;
+ f->indexOfArray = indexOfArraySmallJson;
+ f->indexOfArrayc = indexOfArraycSmallJson;
+ f->indexOfSmallBool = indexOfSmallBoolSmallJson;
+ f->indexOfSmallBytes = indexOfSmallBytesSmallJson;
+ f->indexOfSmallDouble = indexOfSmallDoubleSmallJson;
+ f->indexOfSmallInt = indexOfSmallIntSmallJson;
+ f->indexOfSmallJson = indexOfSmallJsonSmallJson;
+ f->indexOfSmallString = indexOfSmallStringSmallJson;
+ f->indexOfSmallContainer = indexOfSmallContainerSmallJson;
+ f->binarySearch = binarySearchSmallJson;
+ f->binarySearchUndefined = binarySearchUndefinedSmallJson;
+ f->binarySearchBool = binarySearchBoolSmallJson;
+ f->binarySearchDouble = binarySearchDoubleSmallJson;
+ f->binarySearchInt = binarySearchIntSmallJson;
+ f->binarySearchS = binarySearchSSmallJson;
+ f->binarySearchChar = binarySearchCharSmallJson;
+ f->binarySearchDict = binarySearchDictSmallJson;
+ f->binarySearchArray = binarySearchArraySmallJson;
+ f->binarySearchArrayc = binarySearchArraycSmallJson;
+ f->binarySearchSmallBool = binarySearchSmallBoolSmallJson;
+ f->binarySearchSmallBytes = binarySearchSmallBytesSmallJson;
+ f->binarySearchSmallDouble = binarySearchSmallDoubleSmallJson;
+ f->binarySearchSmallInt = binarySearchSmallIntSmallJson;
+ f->binarySearchSmallJson = binarySearchSmallJsonSmallJson;
+ f->binarySearchSmallString = binarySearchSmallStringSmallJson;
+ f->binarySearchSmallContainer = binarySearchSmallContainerSmallJson;
+ f->icHas = icHasSmallJson;
+ f->icHasS = icHasSSmallJson;
+ f->icHasChar = icHasCharSmallJson;
+ f->icHasDict = icHasDictSmallJson;
+ f->icHasArray = icHasArraySmallJson;
+ f->icHasArrayc = icHasArraycSmallJson;
+ f->icHasSmallString = icHasSmallStringSmallJson;
+ f->icFind = icFindSmallJson;
+ f->icFindChar = icFindCharSmallJson;
+ f->icFindSmallString = icFindSmallStringSmallJson;
+ f->icFindJson = icFindJsonSmallJson;
+ f->icIndexOf = icIndexOfSmallJson;
+ f->icIndexOfS = icIndexOfSSmallJson;
+ f->icIndexOfChar = icIndexOfCharSmallJson;
+ f->icIndexOfDict = icIndexOfDictSmallJson;
+ f->icIndexOfArray = icIndexOfArraySmallJson;
+ f->icIndexOfArrayc = icIndexOfArraycSmallJson;
+ f->icIndexOfSmallString = icIndexOfSmallStringSmallJson;
+ f->icBinarySearch = icBinarySearchSmallJson;
+ f->icBinarySearchS = icBinarySearchSSmallJson;
+ f->icBinarySearchChar = icBinarySearchCharSmallJson;
+ f->icBinarySearchDict = icBinarySearchDictSmallJson;
+ f->icBinarySearchArray = icBinarySearchArraySmallJson;
+ f->icBinarySearchArrayc = icBinarySearchArraycSmallJson;
+ f->icBinarySearchSmallString = icBinarySearchSmallStringSmallJson;
+ f->keyBy = keyBySmallJson;
+ f->keyByUndefined = keyByUndefinedSmallJson;
+ f->keyByBool = keyByBoolSmallJson;
+ f->keyByDouble = keyByDoubleSmallJson;
+ f->keyByInt = keyByIntSmallJson;
+ f->keyByS = keyBySSmallJson;
+ f->keyByChar = keyByCharSmallJson;
+ f->keyByDict = keyByDictSmallJson;
+ f->keyByArray = keyByArraySmallJson;
+ f->keyByArrayc = keyByArraycSmallJson;
+ f->keyBySmallBool = keyBySmallBoolSmallJson;
+ f->keyBySmallBytes = keyBySmallBytesSmallJson;
+ f->keyBySmallDouble = keyBySmallDoubleSmallJson;
+ f->keyBySmallInt = keyBySmallIntSmallJson;
+ f->keyBySmallJson = keyBySmallJsonSmallJson;
+ f->keyBySmallString = keyBySmallStringSmallJson;
+ f->keyBySmallContainer = keyBySmallContainerSmallJson;
+ f->icKeyBy = icKeyBySmallJson;
+ f->icKeyByS = icKeyBySSmallJson;
+ f->icKeyByChar = icKeyByCharSmallJson;
+ f->icKeyByDict = icKeyByDictSmallJson;
+ f->icKeyByArray = icKeyByArraySmallJson;
+ f->icKeyByArrayc = icKeyByArraycSmallJson;
+ f->icKeyBySmallString = icKeyBySmallStringSmallJson;
+ f->replace = replaceSmallJson;
+ f->replaceCharS = replaceCharSSmallJson;
+ f->replaceSChar = replaceSCharSmallJson;
+ f->replaceCharChar = replaceCharCharSmallJson;
+ f->replaceSmallStringSmallString = replaceSmallStringSmallStringSmallJson;
+ f->replaceSmallStringS = replaceSmallStringSSmallJson;
+ f->replaceSmallStringChar = replaceSmallStringCharSmallJson;
+ f->replaceSSmallString = replaceSSmallStringSmallJson;
+ f->replaceCharSmallString = replaceCharSmallStringSmallJson;
+ f->replaceJsonJson = replaceJsonJsonSmallJson;
+ f->replaceJsonSmallString = replaceJsonSmallStringSmallJson;
+ f->replaceJsonS = replaceJsonSSmallJson;
+ f->replaceJsonChar = replaceJsonCharSmallJson;
+ f->replaceSmallStringJson = replaceSmallStringJsonSmallJson;
+ f->replaceSJson = replaceSJsonSmallJson;
+ f->replaceCharJson = replaceCharJsonSmallJson;
+ f->replaceMany = replaceManySmallJson;
+ f->icReplace = icReplaceSmallJson;
+ f->icReplaceCharS = icReplaceCharSSmallJson;
+ f->icReplaceSChar = icReplaceSCharSmallJson;
+ f->icReplaceCharChar = icReplaceCharCharSmallJson;
+ f->icReplaceSmallStringSmallString = icReplaceSmallStringSmallStringSmallJson;
+ f->icReplaceSmallStringS = icReplaceSmallStringSSmallJson;
+ f->icReplaceSmallStringChar = icReplaceSmallStringCharSmallJson;
+ f->icReplaceSSmallString = icReplaceSSmallStringSmallJson;
+ f->icReplaceCharSmallString = icReplaceCharSmallStringSmallJson;
+ f->icReplaceJsonJson = icReplaceJsonJsonSmallJson;
+ f->icReplaceJsonSmallString = icReplaceJsonSmallStringSmallJson;
+ f->icReplaceJsonS = icReplaceJsonSSmallJson;
+ f->icReplaceJsonChar = icReplaceJsonCharSmallJson;
+ f->icReplaceSmallStringJson = icReplaceSmallStringJsonSmallJson;
+ f->icReplaceSJson = icReplaceSJsonSmallJson;
+ f->icReplaceCharJson = icReplaceCharJsonSmallJson;
+ f->icReplaceMany = icReplaceManySmallJson;
+ f->equalSmallArray = equalSmallJsonSmallArray;
+ f->equalArray = equalSmallJsonArray;
+ f->equalBase = equalSmallJsonBase;
+ f->equalCha = equalSmallJsonCha;
+ f->equalChar = equalSmallJsonChar;
+ f->equalBool = equalSmallJsonBool;
+ f->equalDouble = equalSmallJsonDouble;
+ f->equalInt64 = equalSmallJsonInt64;
+ f->equalInt32 = equalSmallJsonInt32;
+ f->equalUint32 = equalSmallJsonUint32;
+ f->equalUint64 = equalSmallJsonUint64;
+ f->equalSmallBool = equalSmallJsonSmallBool;
+ f->equalSmallBytes = equalSmallJsonSmallBytes;
+ f->equalSmallDouble = equalSmallJsonSmallDouble;
+ f->equalSmallInt = equalSmallJsonSmallInt;
+ f->equalSmallJson = equalSmallJsonSmallJson;
+ f->equalSmallString = equalSmallJsonSmallString;
+ f->equalSmallDict = equalSmallJsonSmallDict;;
+ f->icEqualSmallArray = icEqualSmallJsonSmallArray;
+ f->icEqualArray = icEqualSmallJsonArray;
+ f->icEqualBase = icEqualSmallJsonBase;
+ f->icEqualSmallDict = icEqualSmallJsonSmallDict;;
+ f->icEqualSmallJson = icEqualSmallJsonSmallJson;
+ f->icEqualSmallString = icEqualSmallJsonSmallString;
+ f->icEqualS = icEqualSSmallJson;
+ f->icEqualChar = icEqualCharSmallJson;
+ f->equalIS = equalISSmallJson;
+ f->equalIChar = equalICharSmallJson;
+ f->equalIJson = equalIJsonSmallJson;
+ f->equalISmallString = equalISmallStringSmallJson;
+ f->startsWithS = startsWithSSmallJson;
+ f->startsWithChar = startsWithCharSmallJson;
+ f->startsWithSmallString = startsWithSmallStringSmallJson;
+ f->startsWithJson = startsWithJsonSmallJson;
+ f->endsWithS = endsWithSSmallJson;
+ f->endsWithChar = endsWithCharSmallJson;
+ f->endsWithSmallString = endsWithSmallStringSmallJson;
+ f->endsWithJson = endsWithJsonSmallJson;
+ f->countS = countSSmallJson;
+ f->countChar = countCharSmallJson;
+ f->countSmallString = countSmallStringSmallJson;
+ f->countJson = countJsonSmallJson;
+ f->icStartsWithS = icStartsWithSSmallJson;
+ f->icStartsWithChar = icStartsWithCharSmallJson;
+ f->icStartsWithSmallString = icStartsWithSmallStringSmallJson;
+ f->icStartsWithJson = icStartsWithJsonSmallJson;
+ f->icEndsWithS = icEndsWithSSmallJson;
+ f->icEndsWithChar = icEndsWithCharSmallJson;
+ f->icEndsWithSmallString = icEndsWithSmallStringSmallJson;
+ f->icEndsWithJson = icEndsWithJsonSmallJson;
+ f->icCountS = icCountSSmallJson;
+ f->icCountChar = icCountCharSmallJson;
+ f->icCountSmallString = icCountSmallStringSmallJson;
+ f->icCountJson = icCountJsonSmallJson;
+ f->isNumber = isNumberSmallJson;
+ f->isInt = isIntSmallJson;
+ f->parseInt = parseIntSmallJson;
+ f->parseDouble = parseDoubleSmallJson;
+ f->intTo = intToSmallJson;
+ f->doubleTo = doubleToSmallJson;
+ f->len = lenSmallJson;
+ f->upper = upperSmallJson;
+ f->lower = lowerSmallJson;
+ f->trim = trimSmallJson;
+ f->lTrim = lTrimSmallJson;
+ f->rTrim = rTrimSmallJson;
+ f->keys = keysSmallJson;
+ f->keysSmallString = keysSmallStringSmallJson;
+ f->values = valuesSmallJson;
+ f->compact = compactSmallJson;
+ f->empty = emptySmallJson;
+ f->isEmpty = isEmptySmallJson;
+ f->isBlank = isBlankSmallJson;
+ f->forEach = forEachSmallJsonF; {
// cg_c bug
- f->enumerate = enumerateSmallJsonF; {
- f->enumerateDict = enumerateDictSmallJson; {
- f->join = joinSmallJson;
- f->joinChar = joinCharSmallJson;
- f->joinSmallJson = joinSmallJsonSmallJson;
- f->joinSmallString = joinSmallStringSmallJson;
- f->joinS = joinSSmallJson;
- f->joinCharS = joinCharSSmallJson;
- f->joinSmallJsonS = joinSmallJsonSSmallJson;
- f->joinSmallStringS = joinSmallStringSSmallJson;
- f->split = splitSmallJson;
- f->splitChar = splitCharSmallJson;
- f->splitSmallJson = splitSmallJsonSmallJson;
- f->splitSmallString = splitSmallStringSmallJson;
- f->splitS = splitSSmallJson;
- f->splitCharS = splitCharSSmallJson;
- f->splitSmallJsonS = splitSmallJsonSSmallJson;
- f->splitSmallStringS = splitSmallStringSSmallJson;
- f->extract = extractSmallJson;
- f->extractCharS = extractCharSSmallJson;
- f->extractSChar = extractSCharSmallJson;
- f->extractCharChar = extractCharCharSmallJson;
- f->extractSmallJsonSmallJson = extractSmallJsonSmallJsonSmallJson;
- f->extractSmallJsonSmallString = extractSmallJsonSmallStringSmallJson;
- f->extractSmallJsonS = extractSmallJsonSSmallJson;
- f->extractSmallJsonChar = extractSmallJsonCharSmallJson;
- f->extractSmallStringSmallJson = extractSmallStringSmallJsonSmallJson;
- f->extractSmallStringSmallString = extractSmallStringSmallStringSmallJson;
- f->extractSmallStringS = extractSmallStringSSmallJson;
- f->extractSmallStringChar = extractSmallStringCharSmallJson;
- f->extractSSmallJson = extractSSmallJsonSmallJson;
- f->extractSSmallString = extractSSmallStringSmallJson;
- f->extractCharSmallJson = extractCharSmallJsonSmallJson;
- f->extractCharSmallString = extractCharSmallStringSmallJson;
- f->icSplit = icSplitSmallJson;
- f->icSplitChar = icSplitCharSmallJson;
- f->icSplitSmallJson = icSplitSmallJsonSmallJson;
- f->icSplitSmallString = icSplitSmallStringSmallJson;
- f->icSplitS = icSplitSSmallJson;
- f->icSplitCharS = icSplitCharSSmallJson;
- f->icSplitSmallJsonS = icSplitSmallJsonSSmallJson;
- f->icSplitSmallStringS = icSplitSmallStringSSmallJson;
- f->icExtract = icExtractSmallJson;
- f->icExtractCharS = icExtractCharSSmallJson;
- f->icExtractSChar = icExtractSCharSmallJson;
- f->icExtractCharChar = icExtractCharCharSmallJson;
- f->icExtractSmallJsonSmallJson = icExtractSmallJsonSmallJsonSmallJson;
- f->icExtractSmallJsonSmallString = icExtractSmallJsonSmallStringSmallJson;
- f->icExtractSmallJsonS = icExtractSmallJsonSSmallJson;
- f->icExtractSmallJsonChar = icExtractSmallJsonCharSmallJson;
- f->icExtractSmallStringSmallJson = icExtractSmallStringSmallJsonSmallJson;
- f->icExtractSmallStringSmallString = icExtractSmallStringSmallStringSmallJson;
- f->icExtractSmallStringS = icExtractSmallStringSSmallJson;
- f->icExtractSmallStringChar = icExtractSmallStringCharSmallJson;
- f->icExtractSSmallJson = icExtractSSmallJsonSmallJson;
- f->icExtractSSmallString = icExtractSSmallStringSmallJson;
- f->icExtractCharSmallJson = icExtractCharSmallJsonSmallJson;
- f->icExtractCharSmallString = icExtractCharSmallStringSmallJson;
- f->color = colorSmallJson;
- f->colord = colordSmallJson;
- f->zip = zipSmallJson;
- f->zipArray = zipArraySmallJson;
- f->zipChar = zipCharSmallJson;
- f->zipArrayChar = zipArrayCharSmallJson;
- f->zipJson = zipJsonSmallJson;
- f->zipJsonSmallArray = zipJsonSmallArraySmallJson;
- f->zipJsonArray = zipJsonArraySmallJson;
- f->zipSmallArrayJson = zipSmallArrayJsonSmallJson;
- f->zipArrayJson = zipArrayJsonSmallJson;
- f->iterStart = iterStartSmallJson;
- f->iterStartKey = iterStartKeySmallJson;
- f->iterStartLast = iterStartLastSmallJson;
- f->iterStartFrom = iterStartFromSmallJson;
- f->iterStartFromStep = iterStartFromStepSmallJson;
- f->iterNext = iterNextSmallJson;
- f->iterNextKey = iterNextKeySmallJson;
- f->iterElement = iterElementSmallJson;
- f->iterKey = iterKeySmallJson;
- f->iterIndex = iterIndexSmallJson;
- f->iterStep = iterStepSmallJson;
- f->stringify = stringifySmallJson; {
- f->stringifySmallString = stringifySmallStringSmallJson; {
- f->toYML = toYMLSmallJson;
- f->toYMLSmallString = toYMLSmallStringSmallJson;
- f->parse = parseSmallJson;
- f->parseSmallJson = parseSmallJsonSmallJson;
- f->parseSmallString = parseSmallStringSmallJson;
- f->parseYML = parseYMLSmallJson;
- f->parseYMLSmallJson = parseYMLSmallJsonSmallJson;
- f->parseYMLSmallString = parseYMLSmallStringSmallJson;
- f->serial = serialSmallJson;
- f->deserial = deserialSmallJson;
- f->log = logSmallJson;
- f->readFile = readFileSmallJson;
- f->readFileSmallString = readFileSmallStringSmallJson;
- f->readFileJson = readFileJsonSmallJson;
- f->readStream = readStreamSmallJson;
- f->writeFile = writeFileSmallJson;
- f->writeFileSmallString = writeFileSmallStringSmallJson;
- f->writeFileJson = writeFileJsonSmallJson;
- f->writeStream = writeStreamSmallJson;
- f->appendFile = appendFileSmallJson;
- f->appendFileSmallString = appendFileSmallStringSmallJson;
- f->appendFileJson = appendFileJsonSmallJson;
- f->readText = readTextSmallJson;
- f->readTextSmallString = readTextSmallStringSmallJson;
- f->readTextJson = readTextJsonSmallJson;
- f->readTextStream = readTextStreamSmallJson;
- f->writeText = writeTextSmallJson;
- f->writeTextSmallString = writeTextSmallStringSmallJson;
- f->writeTextJson = writeTextJsonSmallJson;
- f->writeTextStream = writeTextStreamSmallJson;
- f->appendText = appendTextSmallJson;
- f->appendTextSmallString = appendTextSmallStringSmallJson;
- f->appendTextJson = appendTextJsonSmallJson;
- f->typeString = typeStringSmallJson;
- f->typeSmallString = typeSmallStringSmallJson;
- f->typeAtString = typeAtStringSmallJson;
- f->typeAtSmallString = typeAtSmallStringSmallJson;
- f->typeStringKChar = typeStringKCharSmallJson;
- f->typeSmallStringKChar = typeSmallStringKCharSmallJson;
- f->type = typeSmallJson;
- f->typeKChar = typeKCharSmallJson;
- f->typeAt = typeAtSmallJson;
- f->typeStrings = typeStringsSmallJson;
- f->types = typesSmallJson;
- f->isETypeAt = isETypeAtSmallJson;
- f->isEUndefinedAt = isEUndefinedAtSmallJson;
- f->isEBoolAt = isEBoolAtSmallJson;
- f->isEContainerAt = isEContainerAtSmallJson;
- f->isEDictAt = isEDictAtSmallJson;
- f->isEDoubleAt = isEDoubleAtSmallJson;
- f->isEIntAt = isEIntAtSmallJson;
- f->isEStringAt = isEStringAtSmallJson;
- f->isEFaststringAt = isEFaststringAtSmallJson;
- f->isEArrayAt = isEArrayAtSmallJson;
- f->isEBytesAt = isEBytesAtSmallJson;
- f->isEType = isETypeSmallJson;
- f->isEUndefined = isEUndefinedSmallJson;
- f->isEBool = isEBoolSmallJson;
- f->isEContainer = isEContainerSmallJson;
- f->isEDict = isEDictSmallJson;
- f->isEDouble = isEDoubleSmallJson;
- f->isEInt = isEIntSmallJson;
- f->isEString = isEStringSmallJson;
- f->isEFaststring = isEFaststringSmallJson;
- f->isEArray = isEArraySmallJson;
- f->isEBytes = isEBytesSmallJson;
- f->areAllEType = areAllETypeSmallJson;
- f->areAllEUndefined = areAllEUndefinedSmallJson;
- f->areAllEBool = areAllEBoolSmallJson;
- f->areAllEContainer = areAllEContainerSmallJson;
- f->areAllEDict = areAllEDictSmallJson;
- f->areAllEDouble = areAllEDoubleSmallJson;
- f->areAllEInt = areAllEIntSmallJson;
- f->areAllEString = areAllEStringSmallJson;
- f->areAllEFaststring = areAllEFaststringSmallJson;
- f->areAllEArray = areAllEArraySmallJson;
- f->areAllEBytes = areAllEBytesSmallJson;
+ f->enumerate = enumerateSmallJsonF; {
+ f->enumerateDict = enumerateDictSmallJson; {
+ f->join = joinSmallJson;
+ f->joinChar = joinCharSmallJson;
+ f->joinSmallJson = joinSmallJsonSmallJson;
+ f->joinSmallString = joinSmallStringSmallJson;
+ f->joinS = joinSSmallJson;
+ f->joinCharS = joinCharSSmallJson;
+ f->joinSmallJsonS = joinSmallJsonSSmallJson;
+ f->joinSmallStringS = joinSmallStringSSmallJson;
+ f->split = splitSmallJson;
+ f->splitChar = splitCharSmallJson;
+ f->splitSmallJson = splitSmallJsonSmallJson;
+ f->splitSmallString = splitSmallStringSmallJson;
+ f->splitS = splitSSmallJson;
+ f->splitCharS = splitCharSSmallJson;
+ f->splitSmallJsonS = splitSmallJsonSSmallJson;
+ f->splitSmallStringS = splitSmallStringSSmallJson;
+ f->extract = extractSmallJson;
+ f->extractCharS = extractCharSSmallJson;
+ f->extractSChar = extractSCharSmallJson;
+ f->extractCharChar = extractCharCharSmallJson;
+ f->extractSmallJsonSmallJson = extractSmallJsonSmallJsonSmallJson;
+ f->extractSmallJsonSmallString = extractSmallJsonSmallStringSmallJson;
+ f->extractSmallJsonS = extractSmallJsonSSmallJson;
+ f->extractSmallJsonChar = extractSmallJsonCharSmallJson;
+ f->extractSmallStringSmallJson = extractSmallStringSmallJsonSmallJson;
+ f->extractSmallStringSmallString = extractSmallStringSmallStringSmallJson;
+ f->extractSmallStringS = extractSmallStringSSmallJson;
+ f->extractSmallStringChar = extractSmallStringCharSmallJson;
+ f->extractSSmallJson = extractSSmallJsonSmallJson;
+ f->extractSSmallString = extractSSmallStringSmallJson;
+ f->extractCharSmallJson = extractCharSmallJsonSmallJson;
+ f->extractCharSmallString = extractCharSmallStringSmallJson;
+ f->icSplit = icSplitSmallJson;
+ f->icSplitChar = icSplitCharSmallJson;
+ f->icSplitSmallJson = icSplitSmallJsonSmallJson;
+ f->icSplitSmallString = icSplitSmallStringSmallJson;
+ f->icSplitS = icSplitSSmallJson;
+ f->icSplitCharS = icSplitCharSSmallJson;
+ f->icSplitSmallJsonS = icSplitSmallJsonSSmallJson;
+ f->icSplitSmallStringS = icSplitSmallStringSSmallJson;
+ f->icExtract = icExtractSmallJson;
+ f->icExtractCharS = icExtractCharSSmallJson;
+ f->icExtractSChar = icExtractSCharSmallJson;
+ f->icExtractCharChar = icExtractCharCharSmallJson;
+ f->icExtractSmallJsonSmallJson = icExtractSmallJsonSmallJsonSmallJson;
+ f->icExtractSmallJsonSmallString = icExtractSmallJsonSmallStringSmallJson;
+ f->icExtractSmallJsonS = icExtractSmallJsonSSmallJson;
+ f->icExtractSmallJsonChar = icExtractSmallJsonCharSmallJson;
+ f->icExtractSmallStringSmallJson = icExtractSmallStringSmallJsonSmallJson;
+ f->icExtractSmallStringSmallString = icExtractSmallStringSmallStringSmallJson;
+ f->icExtractSmallStringS = icExtractSmallStringSSmallJson;
+ f->icExtractSmallStringChar = icExtractSmallStringCharSmallJson;
+ f->icExtractSSmallJson = icExtractSSmallJsonSmallJson;
+ f->icExtractSSmallString = icExtractSSmallStringSmallJson;
+ f->icExtractCharSmallJson = icExtractCharSmallJsonSmallJson;
+ f->icExtractCharSmallString = icExtractCharSmallStringSmallJson;
+ f->color = colorSmallJson;
+ f->colord = colordSmallJson;
+ f->zip = zipSmallJson;
+ f->zipArray = zipArraySmallJson;
+ f->zipChar = zipCharSmallJson;
+ f->zipArrayChar = zipArrayCharSmallJson;
+ f->zipJson = zipJsonSmallJson;
+ f->zipJsonSmallArray = zipJsonSmallArraySmallJson;
+ f->zipJsonArray = zipJsonArraySmallJson;
+ f->zipSmallArrayJson = zipSmallArrayJsonSmallJson;
+ f->zipArrayJson = zipArrayJsonSmallJson;
+ f->iterStart = iterStartSmallJson;
+ f->iterStartKey = iterStartKeySmallJson;
+ f->iterStartLast = iterStartLastSmallJson;
+ f->iterStartFrom = iterStartFromSmallJson;
+ f->iterStartFromStep = iterStartFromStepSmallJson;
+ f->iterNext = iterNextSmallJson;
+ f->iterNextKey = iterNextKeySmallJson;
+ f->iterElement = iterElementSmallJson;
+ f->iterKey = iterKeySmallJson;
+ f->iterIndex = iterIndexSmallJson;
+ f->iterStep = iterStepSmallJson;
+ f->stringify = stringifySmallJson; {
+ f->stringifySmallString = stringifySmallStringSmallJson; {
+ f->toYML = toYMLSmallJson;
+ f->toYMLSmallString = toYMLSmallStringSmallJson;
+ f->parse = parseSmallJson;
+ f->parseSmallJson = parseSmallJsonSmallJson;
+ f->parseSmallString = parseSmallStringSmallJson;
+ f->parseYML = parseYMLSmallJson;
+ f->parseYMLSmallJson = parseYMLSmallJsonSmallJson;
+ f->parseYMLSmallString = parseYMLSmallStringSmallJson;
+ f->serial = serialSmallJson;
+ f->deserial = deserialSmallJson;
+ f->log = logSmallJson;
+ f->readFile = readFileSmallJson;
+ f->readFileSmallString = readFileSmallStringSmallJson;
+ f->readFileJson = readFileJsonSmallJson;
+ f->readStream = readStreamSmallJson;
+ f->writeFile = writeFileSmallJson;
+ f->writeFileSmallString = writeFileSmallStringSmallJson;
+ f->writeFileJson = writeFileJsonSmallJson;
+ f->writeStream = writeStreamSmallJson;
+ f->appendFile = appendFileSmallJson;
+ f->appendFileSmallString = appendFileSmallStringSmallJson;
+ f->appendFileJson = appendFileJsonSmallJson;
+ f->readText = readTextSmallJson;
+ f->readTextSmallString = readTextSmallStringSmallJson;
+ f->readTextJson = readTextJsonSmallJson;
+ f->readTextStream = readTextStreamSmallJson;
+ f->writeText = writeTextSmallJson;
+ f->writeTextSmallString = writeTextSmallStringSmallJson;
+ f->writeTextJson = writeTextJsonSmallJson;
+ f->writeTextStream = writeTextStreamSmallJson;
+ f->appendText = appendTextSmallJson;
+ f->appendTextSmallString = appendTextSmallStringSmallJson;
+ f->appendTextJson = appendTextJsonSmallJson;
+ f->typeString = typeStringSmallJson;
+ f->typeSmallString = typeSmallStringSmallJson;
+ f->typeAtString = typeAtStringSmallJson;
+ f->typeAtSmallString = typeAtSmallStringSmallJson;
+ f->typeStringKChar = typeStringKCharSmallJson;
+ f->typeSmallStringKChar = typeSmallStringKCharSmallJson;
+ f->type = typeSmallJson;
+ f->typeKChar = typeKCharSmallJson;
+ f->typeAt = typeAtSmallJson;
+ f->typeStrings = typeStringsSmallJson;
+ f->types = typesSmallJson;
+ f->isETypeAt = isETypeAtSmallJson;
+ f->isEUndefinedAt = isEUndefinedAtSmallJson;
+ f->isEBoolAt = isEBoolAtSmallJson;
+ f->isEContainerAt = isEContainerAtSmallJson;
+ f->isEDictAt = isEDictAtSmallJson;
+ f->isEDoubleAt = isEDoubleAtSmallJson;
+ f->isEIntAt = isEIntAtSmallJson;
+ f->isEStringAt = isEStringAtSmallJson;
+ f->isEFaststringAt = isEFaststringAtSmallJson;
+ f->isEArrayAt = isEArrayAtSmallJson;
+ f->isEBytesAt = isEBytesAtSmallJson;
+ f->isEType = isETypeSmallJson;
+ f->isEUndefined = isEUndefinedSmallJson;
+ f->isEBool = isEBoolSmallJson;
+ f->isEContainer = isEContainerSmallJson;
+ f->isEDict = isEDictSmallJson;
+ f->isEDouble = isEDoubleSmallJson;
+ f->isEInt = isEIntSmallJson;
+ f->isEString = isEStringSmallJson;
+ f->isEFaststring = isEFaststringSmallJson;
+ f->isEArray = isEArraySmallJson;
+ f->isEBytes = isEBytesSmallJson;
+ f->areAllEType = areAllETypeSmallJson;
+ f->areAllEUndefined = areAllEUndefinedSmallJson;
+ f->areAllEBool = areAllEBoolSmallJson;
+ f->areAllEContainer = areAllEContainerSmallJson;
+ f->areAllEDict = areAllEDictSmallJson;
+ f->areAllEDouble = areAllEDoubleSmallJson;
+ f->areAllEInt = areAllEIntSmallJson;
+ f->areAllEString = areAllEStringSmallJson;
+ f->areAllEFaststring = areAllEFaststringSmallJson;
+ f->areAllEArray = areAllEArraySmallJson;
+ f->areAllEBytes = areAllEBytesSmallJson;
}
}
}
@@ -2515,7 +2642,8 @@ internal char* toStringSmallJson(smallJsont *self) {
internal smallJsont* duplicateSmallJson(smallJsont *self) {
createAllocateSmallJson(dup);
- dup->topIsA = self->topIsA;
+ dup->topIsA = self->topIsA;
+ dup->iterElementDataType = self->iterElementDataType;
switch(self->topIsA) {
case TOP_IS_UNDEFINED:
dup->topU = allocSUndefined();
@@ -2650,7 +2778,9 @@ internal const char* helpSmallJson(smallJsont UNUSED *self) {
internal void resetSmallJson(smallJsont *self) {
if (self->iterIndex != -1) {
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
self->iterElement = NULL;
self->iterIndex = -1;
}
@@ -2839,7 +2969,9 @@ internal smallJsont* setTopSmallJson(smallJsont *self, baset *value) {
// reset iterator
if (self->iterIndex != -1) {
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
self->iterElement = NULL;
self->iterIndex = -1;
}
@@ -2935,21 +3067,39 @@ internal smallJsont* setTopSmallJson(smallJsont *self, baset *value) {
internal smallJsont* setTopBoolSmallJson(smallJsont *self, bool value) {
smallBoolt *v = allocSmallBool(value);
- setTopNFreeSmallJson(self, (baset*) v);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (r) {
+ finishO(v);
+ }
+ else {
+ terminateO(v);
+ }
return(self);
}
internal smallJsont* setTopDoubleSmallJson(smallJsont *self, double value) {
smallDoublet *v = allocSmallDouble(value);;
- setTopNFreeSmallJson(self, (baset*) v);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (r) {
+ finishO(v);
+ }
+ else {
+ terminateO(v);
+ }
return(self);
}
internal smallJsont* setTopIntSmallJson(smallJsont *self, int64_t value) {
- smallIntt *v = allocSmallInt(value);;
- setTopNFreeSmallJson(self, (baset*) v);
+ smallIntt *v = allocSmallInt(value);;
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (r) {
+ finishO(v);
+ }
+ else {
+ terminateO(v);
+ }
return(self);
}
@@ -2959,7 +3109,13 @@ internal smallJsont* setTopStringSmallJson(smallJsont *self, const char *value)
return(NULL);
}
smallStringt *v = allocSmallString(value);;
- setTopNFreeSmallJson(self, (baset*) v);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (r) {
+ finishO(v);
+ }
+ else {
+ terminateO(v);
+ }
return(self);
}
@@ -2995,7 +3151,12 @@ internal smallJsont* setTopArraycSmallJson(smallJsont *self, char **value) {
return(NULL);
}
- return(setTopNFreeArraySmallJson(self, allocArraySmallArray(value)));
+ smallArrayt *a = allocArraySmallArray(value);;
+ smallJsont *r = setTopNFreeArraySmallJson(self, a);
+ if (!r) {
+ terminateO(a);
+ }
+ return(r);
}
internal smallJsont* setTopSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
@@ -3050,29 +3211,40 @@ internal smallJsont* setTopSmallStringSmallJson(smallJsont *self, smallStringt *
internal smallJsont* setTopNFreeSmallJson(smallJsont *self, baset *value) {
- setTopSmallJson(self, value);
- finishO(value);
+ smallJsont *r = setTopSmallJson(self, value);;
+ if (r) {
+ finishO(value);
+ }
return(self);
}
internal smallJsont* setTopNFreeBoolSmallJson(smallJsont *self, bool value) {
smallBoolt *v = allocSmallBool(value);
- setTopNFreeSmallJson(self, (baset*) v);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (!r) {
+ terminateO(v);
+ }
return(self);
}
internal smallJsont* setTopNFreeDoubleSmallJson(smallJsont *self, double value) {
smallDoublet *v = allocSmallDouble(value);;
- setTopNFreeSmallJson(self, (baset*) v);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (!r) {
+ terminateO(v);
+ }
return(self);
}
internal smallJsont* setTopNFreeIntSmallJson(smallJsont *self, int64_t value) {
- smallIntt *v = allocSmallInt(value);;
- setTopNFreeSmallJson(self, (baset*) v);
+ smallIntt *v = allocSmallInt(value);;
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (!r) {
+ terminateO(v);
+ }
return(self);
}
@@ -3082,31 +3254,33 @@ internal smallJsont* setTopNFreeStringSmallJson(smallJsont *self, char *value) {
return(NULL);
}
smallStringt *v = allocSmallString(value);;
- setTopNFreeSmallJson(self, (baset*) v);
- free(value);
+ smallJsont *r = setTopNFreeSmallJson(self, (baset*) v);;
+ if (r) {
+ free(value);
+ finishO(v);
+ }
+ else {
+ terminateO(v);
+ }
return(self);
}
internal smallJsont* setTopNFreeDictSmallJson(smallJsont *self, smallDictt *value) {
if (checkObjectTypes && value && !isOSmallDict(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeArraySmallJson(smallJsont *self, smallArrayt *value) {
if (checkObjectTypes && value && !isOSmallArray(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeArraycSmallJson(smallJsont *self, char **value) {
@@ -3115,64 +3289,60 @@ internal smallJsont* setTopNFreeArraycSmallJson(smallJsont *self, char **value)
return(NULL);
}
- smallJsont *r = setTopNFreeArraySmallJson(self, allocArraySmallArray(value));
- listFreeS(value);
+ smallArrayt *a = allocArraySmallArray(value);
+ smallJsont *r = setTopNFreeArraySmallJson(self, a);
+ if (r) {
+ listFreeS(value);
+ }
+ else {
+ terminateO(a);
+ }
return(r);
}
internal smallJsont* setTopNFreeSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
if (checkObjectTypes && value && !isOSmallBool(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeSmallDoubleSmallJson(smallJsont *self, smallDoublet *value) {
if (checkObjectTypes && value && !isOSmallDouble(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeSmallIntSmallJson(smallJsont *self, smallIntt *value) {
if (checkObjectTypes && value && !isOSmallInt(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeSmallJsonSmallJson(smallJsont *self, smallJsont *value) {
if (checkObjectTypes && value && !isOSmallJson(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
internal smallJsont* setTopNFreeSmallStringSmallJson(smallJsont *self, smallStringt *value) {
if (checkObjectTypes && value && !isOSmallString(value)) {
- terminateO(value);
return(NULL);
}
- setTopNFreeSmallJson(self, (baset*) value);
- return(self);
+ return(setTopNFreeSmallJson(self, (baset*) value));
}
// size 0 means NULL terminated array
@@ -3800,7 +3970,8 @@ internal void unescapeKey(char *dest, char *key, size_t length) {
internal smallJsont* setSmallJson(smallJsont *self, const char *key, baset *value) {
- mainSetJsonPath(/*initValue*/, o=!value?(smallt*)allocSUndefined():toSmallt(value)/*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ // TODO remove memory leak when !value is true and setJsonPath fails
+ mainSetJsonPath(if (!value) return NULL/*initValue*/, o=toSmallt(value)/*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
@@ -3830,7 +4001,7 @@ internal smallJsont* setIntSmallJson(smallJsont *self, const char *key, int64_t
internal smallJsont* setSSmallJson(smallJsont *self, const char *key, const char *string) {
- mainSetJsonPath(o=!string?/*set empty string when NULL*/(smallt*)allocSStringTiny(""):(smallt*)allocSStringTiny(string)/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!string) return NULL; o=(smallt*)allocSStringTiny(string)/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
@@ -3842,68 +4013,71 @@ internal smallJsont* setCharSmallJson(smallJsont *self, const char *key, char c)
internal smallJsont* setDictSmallJson(smallJsont *self, const char *key, smallDictt *dict) {
- mainSetJsonPath(if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL;if (!dict) o = (smallt *) allocSDict(); else{if (!dict->d) dict->d = allocSDict();o = (smallt *)dict->d;}/*initValue*/,/*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!dict) return NULL; if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL;if (!dict->d) dict->d = allocSDict();o = (smallt *)dict->d;/*initValue*/,/*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setArraySmallJson(smallJsont *self, const char *key, smallArrayt *array) {
- mainSetJsonPath(if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; if (!array) o = (smallt *) allocSArray(); else {if (!array->a) /*allocate empty array*/ array->a = allocSArray(); o = (smallt *)array->a;}/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!array) return NULL; if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; if (!array->a) /*allocate empty array*/ array->a = allocSArray(); o = (smallt *)array->a;/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setArraycSmallJson(smallJsont *self, const char *key, char **array) {
- mainSetJsonPath(if (!array) o = (smallt *) allocSArray(); else {sArrayt *a = allocSArray();forEachCharP(array, e){sStringt *s = allocSStringTiny(*e);sArrayPushTiny(&a, (smallt *) s);}o = (smallt *)a;}/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!array) return NULL; sArrayt *a = allocSArray();forEachCharP(array, e){sStringt *s = allocSStringTiny(*e);sArrayPushTiny(&a, (smallt *) s);}o = (smallt *)a;/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallBoolSmallJson(smallJsont *self, const char *key, smallBoolt *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallBool(value)) return NULL; o = !value?(smallt*)allocSUndefined():(smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallBool(value)) return NULL; o = (smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallBytesSmallJson(smallJsont *self, const char *key, smallBytest *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallBytes(value)) return NULL; o = (!value||!value->B)?(smallt*)allocSUndefined():(smallt*)value->B/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallBytes(value)) return NULL; o = (!value->B)?(smallt*)allocSUndefined():(smallt*)value->B/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallDoubleSmallJson(smallJsont *self, const char *key, smallDoublet *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallDouble(value)) return NULL; o = !value?(smallt*)allocSUndefined():(smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallDouble(value)) return NULL; o = (smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallIntSmallJson(smallJsont *self, const char *key, smallIntt *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallInt(value)) return NULL; o = !value?(smallt*)allocSUndefined():(smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallInt(value)) return NULL; o = (smallt*)value->value/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallJsonSmallJson(smallJsont *self, const char *key, smallJsont *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; if (!value) o = (smallt *) allocSUndefined(); else {switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}}/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallStringSmallJson(smallJsont *self, const char *key, smallStringt *string) {
- mainSetJsonPath(if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string||!string->data)?(smallt*)allocSUndefined():(smallt*)string->data/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!string) return NULL; if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string->data)?(smallt*)allocSStringTiny(""):(smallt*)string->data/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setSmallContainerSmallJson(smallJsont *self, const char *key, smallContainert *container) {
- mainSetJsonPath(if (checkObjectTypes && container && !isOSmallContainer(container)) return NULL; if (!container) o = (smallt *) allocSUndefined(); else {if (!container->data) o = (smallt *) allocSContainer(NULL); else o = (smallt *) container->data;}/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ mainSetJsonPath(if (!container) return NULL; if (checkObjectTypes && container && !isOSmallContainer(container)) return NULL; if (!container->data) o = (smallt *) allocSContainer(NULL); else o = (smallt *) container->data/*initValue*/, /*allocValue*/, setJsonPath/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setNFreeSmallJson(smallJsont *self, const char *key, baset *value) {
- smallJsont *r = setSmallJson(self, key, value);
- if (r) {
+ // TODO remove memory leak when !value is true and setJsonPath fails
+ mainSetJsonPath(if (!value) return NULL/*initValue*/, o=toSmallt(value)/*allocValue*/, setJsonPath/*subSetJsonPath*/);
+ // cg_c bug
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
/* free parameter only when successfully stored in self */
finishO(value);
}
@@ -4024,55 +4198,55 @@ internal smallJsont* setNFreeSmallContainerSmallJson(smallJsont *self, const cha
internal smallJsont* setPDictSmallJson(smallJsont *self, const char *key, smallDictt *dict) {
- mainSetJsonPath(if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL;if (!dict) o = (smallt *) allocSDict(); else o = (smallt *)dict->d/*initValue*/,/*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!dict) return NULL; if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL; o = (smallt *)dict->d/*initValue*/,/*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setPArraySmallJson(smallJsont *self, const char *key, smallArrayt *array) {
- mainSetJsonPath(if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; if (!array) o = (smallt *) allocSArray(); else o = (smallt *)array->a/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!array) return NULL; if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; o = (smallt *)array->a/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setPSmallJsonSmallJson(smallJsont *self, const char *key, smallJsont *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; if (!value) o = (smallt *) allocSUndefined(); else {switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}}/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setPSmallStringSmallJson(smallJsont *self, const char *key, smallStringt *string) {
- mainSetJsonPath(if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string||!string->data)?(smallt*)allocSUndefined():(smallt*)string->data/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!string) return NULL; if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string->data)?(smallt*)allocSUndefined():(smallt*)string->data/*initValue*/, /*allocValue*/, setPJsonPath(o)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setNFreePDictSmallJson(smallJsont *self, const char *key, smallDictt *dict) {
- mainSetJsonPath(if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL;if (!dict) o = (smallt *) allocSDict(); else o = (smallt *)dict->d/*initValue*/,/*allocValue*/, setPNFreeJsonPath(o,finishO(dict));finishO(dict)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!dict) return NULL; if (checkObjectTypes && dict && !isOSmallDict(dict)) return NULL; o = (smallt *)dict->d/*initValue*/,/*allocValue*/, setPNFreeJsonPath(o,finishO(dict));finishO(dict)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setNFreePArraySmallJson(smallJsont *self, const char *key, smallArrayt *array) {
- mainSetJsonPath(if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; if (!array) o = (smallt *) allocSArray(); else o = (smallt *)array->a/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(array));finishO(array)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!array) return NULL; if (checkObjectTypes && array && !isOSmallArray(array)) return NULL; o = (smallt *)array->a/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(array));finishO(array)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setNFreePSmallJsonSmallJson(smallJsont *self, const char *key, smallJsont *value) {
- mainSetJsonPath(if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; if (!value) o = (smallt *) allocSUndefined(); else {switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}}/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(value));finishO(value)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!value) return NULL; if (checkObjectTypes && value && !isOSmallJson(value)) return NULL; switch(value->topIsA){case SMALLJSON_IS_EMPTY:o = (smallt *) allocSUndefined();break;case TOP_IS_UNDEFINED:o = (smallt *) value->topU;break;case TOP_IS_BOOL:o = (smallt *) value->topB;break;case TOP_IS_DOUBLE:o = (smallt *) value->topD;break;case TOP_IS_INT:o = (smallt *) value->topI;break;case TOP_IS_STRING:o = (smallt *) value->topS;break;case TOP_IS_DICT:o = (smallt *) value->top;break;case TOP_IS_ARRAY:o = (smallt *) value->topA;break;}/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(value));finishO(value)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setNFreePSmallStringSmallJson(smallJsont *self, const char *key, smallStringt *string) {
- mainSetJsonPath(if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string||!string->data)?(smallt*)allocSUndefined():(smallt*)string->data/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(string));finishO(string)/*subSetJsonPath*/);
+ mainSetJsonPath(if (!string) return NULL; if (checkObjectTypes && string && !isOSmallString(string)) return NULL; o = (!string->data)?(smallt*)allocSUndefined():(smallt*)string->data/*initValue*/, /*allocValue*/, setPNFreeJsonPath(o,finishO(string));finishO(string)/*subSetJsonPath*/);
// cg_c bug
}
internal smallJsont* setAtSmallJson(smallJsont *self, intmax_t index, baset *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4176,7 +4350,7 @@ internal smallJsont* setAtIntSmallJson(smallJsont *self, intmax_t index, int64_t
internal smallJsont* setAtSSmallJson(smallJsont *self, intmax_t index, const char *string) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !string) {
return(NULL);
}
@@ -4191,13 +4365,7 @@ internal smallJsont* setAtSSmallJson(smallJsont *self, intmax_t index, const cha
}
smallt *o;
- if (!string) {
- // create an empty sStringt instead of NULL
- o = (smallt *) allocSStringTiny("");
- }
- else {
- o = (smallt *) allocSStringTiny(string);
- }
+ o = (smallt *) allocSStringTiny(string);
sArraySetTiny(self->topA, index, o);
return(self);
}
@@ -4214,7 +4382,7 @@ internal smallJsont* setAtCharSmallJson(smallJsont *self, intmax_t index, char c
internal smallJsont* setAtDictSmallJson(smallJsont *self, intmax_t index, smallDictt *dict) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !dict) {
return(NULL);
}
@@ -4232,11 +4400,6 @@ internal smallJsont* setAtDictSmallJson(smallJsont *self, intmax_t index, smallD
index = lenSmallJson(self) + index;
}
- if (!dict) {
- sArraySetTiny(self->topA, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -4248,7 +4411,7 @@ internal smallJsont* setAtDictSmallJson(smallJsont *self, intmax_t index, smallD
internal smallJsont* setAtArraySmallJson(smallJsont *self, intmax_t index, smallArrayt *array) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !array) {
return(NULL);
}
@@ -4266,11 +4429,6 @@ internal smallJsont* setAtArraySmallJson(smallJsont *self, intmax_t index, small
index = lenSmallJson(self) + index;
}
- if (!array) {
- sArraySetTiny(self->topA, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -4282,7 +4440,7 @@ internal smallJsont* setAtArraySmallJson(smallJsont *self, intmax_t index, small
internal smallJsont* setAtArraycSmallJson(smallJsont *self, intmax_t index, char **array) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !array) {
return(NULL);
}
@@ -4296,11 +4454,6 @@ internal smallJsont* setAtArraycSmallJson(smallJsont *self, intmax_t index, char
index = lenSmallJson(self) + index;
}
- if (!array) {
- sArraySetTiny(self->topA, index, (smallt *)allocSArray());
- return(self);
- }
-
sArrayt *a = allocSArray();
forEachCharP(array, e) {
@@ -4314,7 +4467,7 @@ internal smallJsont* setAtArraycSmallJson(smallJsont *self, intmax_t index, char
internal smallJsont* setAtSmallBoolSmallJson(smallJsont *self, intmax_t index, smallBoolt *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4332,11 +4485,6 @@ internal smallJsont* setAtSmallBoolSmallJson(smallJsont *self, intmax_t index, s
index = lenSmallJson(self) + index;
}
- if (!value) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->topA, index, o);
return(self);
@@ -4344,7 +4492,7 @@ internal smallJsont* setAtSmallBoolSmallJson(smallJsont *self, intmax_t index, s
internal smallJsont* setAtSmallBytesSmallJson(smallJsont *self, intmax_t index, smallBytest *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4362,11 +4510,6 @@ internal smallJsont* setAtSmallBytesSmallJson(smallJsont *self, intmax_t index,
index = lenSmallJson(self) + index;
}
- if (!value) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->B;
sArraySetTiny(self->topA, index, o);
return(self);
@@ -4374,7 +4517,7 @@ internal smallJsont* setAtSmallBytesSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setAtSmallDoubleSmallJson(smallJsont *self, intmax_t index, smallDoublet *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4392,11 +4535,6 @@ internal smallJsont* setAtSmallDoubleSmallJson(smallJsont *self, intmax_t index,
index = lenSmallJson(self) + index;
}
- if (!value) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->topA, index, o);
return(self);
@@ -4404,7 +4542,7 @@ internal smallJsont* setAtSmallDoubleSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setAtSmallIntSmallJson(smallJsont *self, intmax_t index, smallIntt *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4422,11 +4560,6 @@ internal smallJsont* setAtSmallIntSmallJson(smallJsont *self, intmax_t index, sm
index = lenSmallJson(self) + index;
}
- if (!value) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArraySetTiny(self->topA, index, o);
return(self);
@@ -4434,7 +4567,7 @@ internal smallJsont* setAtSmallIntSmallJson(smallJsont *self, intmax_t index, sm
internal smallJsont* setAtSmallJsonSmallJson(smallJsont *self, intmax_t index, smallJsont *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4452,42 +4585,32 @@ internal smallJsont* setAtSmallJsonSmallJson(smallJsont *self, intmax_t index, s
index = lenSmallJson(self) + index;
}
- if (!value) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o;
- if (!value) {
- o = (smallt *) allocSUndefined();
- }
- else {
- switch(value->topIsA){
- case SMALLJSON_IS_EMPTY:
- o = (smallt *) allocSUndefined();
- break;
- case TOP_IS_UNDEFINED:
- o = (smallt *) value->topU;
- break;
- case TOP_IS_BOOL:
- o = (smallt *) value->topB;
- break;
- case TOP_IS_DOUBLE:
- o = (smallt *) value->topD;
- break;
- case TOP_IS_INT:
- o = (smallt *) value->topI;
- break;
- case TOP_IS_STRING:
- o = (smallt *) value->topS;
- break;
- case TOP_IS_DICT:
- o = (smallt *) value->top;
- break;
- case TOP_IS_ARRAY:
- o = (smallt *) value->topA;
- break;
- }
+ switch(value->topIsA){
+ case SMALLJSON_IS_EMPTY:
+ o = (smallt *) allocSUndefined();
+ break;
+ case TOP_IS_UNDEFINED:
+ o = (smallt *) value->topU;
+ break;
+ case TOP_IS_BOOL:
+ o = (smallt *) value->topB;
+ break;
+ case TOP_IS_DOUBLE:
+ o = (smallt *) value->topD;
+ break;
+ case TOP_IS_INT:
+ o = (smallt *) value->topI;
+ break;
+ case TOP_IS_STRING:
+ o = (smallt *) value->topS;
+ break;
+ case TOP_IS_DICT:
+ o = (smallt *) value->top;
+ break;
+ case TOP_IS_ARRAY:
+ o = (smallt *) value->topA;
+ break;
}
sArraySetTiny(self->topA, index, o);
return(self);
@@ -4495,7 +4618,7 @@ internal smallJsont* setAtSmallJsonSmallJson(smallJsont *self, intmax_t index, s
internal smallJsont* setAtSmallStringSmallJson(smallJsont *self, intmax_t index, smallStringt *string) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !string) {
return(NULL);
}
@@ -4514,7 +4637,7 @@ internal smallJsont* setAtSmallStringSmallJson(smallJsont *self, intmax_t index,
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -4527,7 +4650,7 @@ internal smallJsont* setAtSmallStringSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setAtSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *container) {
smallt *o = NULL;
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !container) {
return(NULL);
}
@@ -4546,11 +4669,6 @@ internal smallJsont* setAtSmallContainerSmallJson(smallJsont *self, intmax_t ind
index = lenSmallJson(self) + index;
}
- if (!container) {
- sArraySetTiny(self->topA, index, (smallt *)allocSUndefined());
- return(self);
- }
-
if (!container->data) {
o = (smallt *) allocSContainer(NULL);
}
@@ -4563,16 +4681,25 @@ internal smallJsont* setAtSmallContainerSmallJson(smallJsont *self, intmax_t ind
internal smallJsont* setAtNFreeSmallJson(smallJsont *self, intmax_t index, baset *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
- smallJsont *r = setAtSmallJson(self, index, value);
- if (r) {
- finishO(value);
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
}
- else {
- terminateO(value);
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = toSmallt(value);
+ sArraySetTiny(self->topA, index, o);
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
}
return(self);
}
@@ -4583,9 +4710,11 @@ internal smallJsont* setAtNFreeUndefinedSmallJson(smallJsont *self, intmax_t ind
return(NULL);
}
- setAtUndefinedSmallJson(self, index);
- terminateO(undefined);
- return(self);
+ smallJsont *r = setAtUndefinedSmallJson(self, index);;
+ if (r) {
+ terminateO(undefined);
+ }
+ return(r);
}
internal smallJsont* setAtNFreeSSmallJson(smallJsont *self, intmax_t index, char *string) {
@@ -4594,9 +4723,11 @@ internal smallJsont* setAtNFreeSSmallJson(smallJsont *self, intmax_t index, char
return(NULL);
}
- setAtSSmallJson(self, index, string);
- free(string);
- return(self);
+ smallJsont *r = setAtSSmallJson(self, index, string);;
+ if (r) {
+ free(string);
+ }
+ return(r);
}
internal smallJsont* setAtNFreeDictSmallJson(smallJsont *self, intmax_t index, smallDictt *dict) {
@@ -4609,9 +4740,6 @@ internal smallJsont* setAtNFreeDictSmallJson(smallJsont *self, intmax_t index, s
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -4625,9 +4753,6 @@ internal smallJsont* setAtNFreeArraySmallJson(smallJsont *self, intmax_t index,
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
@@ -4637,9 +4762,11 @@ internal smallJsont* setAtNFreeArraycSmallJson(smallJsont *self, intmax_t index,
return(NULL);
}
- setAtArraycSmallJson(self, index, array);
- listFreeS(array);
- return(self);
+ smallJsont *r = setAtArraycSmallJson(self, index, array);;
+ if (r) {
+ listFreeS(array);
+ }
+ return(r);
}
internal smallJsont* setAtNFreeSmallBoolSmallJson(smallJsont *self, intmax_t index, smallBoolt *value) {
@@ -4652,9 +4779,6 @@ internal smallJsont* setAtNFreeSmallBoolSmallJson(smallJsont *self, intmax_t ind
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -4668,9 +4792,6 @@ internal smallJsont* setAtNFreeSmallBytesSmallJson(smallJsont *self, intmax_t in
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -4684,9 +4805,6 @@ internal smallJsont* setAtNFreeSmallDoubleSmallJson(smallJsont *self, intmax_t i
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -4700,9 +4818,6 @@ internal smallJsont* setAtNFreeSmallIntSmallJson(smallJsont *self, intmax_t inde
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -4716,9 +4831,6 @@ internal smallJsont* setAtNFreeSmallJsonSmallJson(smallJsont *self, intmax_t ind
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -4732,9 +4844,6 @@ internal smallJsont* setAtNFreeSmallStringSmallJson(smallJsont *self, intmax_t i
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -4748,16 +4857,13 @@ internal smallJsont* setAtNFreeSmallContainerSmallJson(smallJsont *self, intmax_
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
internal smallJsont* setPAtDictSmallJson(smallJsont *self, intmax_t index, smallDictt *dict) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !dict) {
return(NULL);
}
@@ -4775,11 +4881,6 @@ internal smallJsont* setPAtDictSmallJson(smallJsont *self, intmax_t index, small
index = lenSmallJson(self) + index;
}
- if (!dict) {
- sArraySetP(self->topA, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -4790,7 +4891,7 @@ internal smallJsont* setPAtDictSmallJson(smallJsont *self, intmax_t index, small
internal smallJsont* setPAtArraySmallJson(smallJsont *self, intmax_t index, smallArrayt *array) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !array) {
return(NULL);
}
@@ -4808,11 +4909,6 @@ internal smallJsont* setPAtArraySmallJson(smallJsont *self, intmax_t index, smal
index = lenSmallJson(self) + index;
}
- if (!array) {
- sArraySetP(self->topA, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -4824,7 +4920,7 @@ internal smallJsont* setPAtArraySmallJson(smallJsont *self, intmax_t index, smal
internal smallJsont* setPAtSmallJsonSmallJson(smallJsont *self, intmax_t index, smallJsont *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -4843,36 +4939,31 @@ internal smallJsont* setPAtSmallJsonSmallJson(smallJsont *self, intmax_t index,
}
smallt *o;
- if (!value) {
- o = (smallt *) allocSUndefined();
- }
- else {
- switch(value->topIsA){
- case SMALLJSON_IS_EMPTY:
- o = (smallt *) allocSUndefined();
- break;
- case TOP_IS_UNDEFINED:
- o = (smallt *) value->topU;
- break;
- case TOP_IS_BOOL:
- o = (smallt *) value->topB;
- break;
- case TOP_IS_DOUBLE:
- o = (smallt *) value->topD;
- break;
- case TOP_IS_INT:
- o = (smallt *) value->topI;
- break;
- case TOP_IS_STRING:
- o = (smallt *) value->topS;
- break;
- case TOP_IS_DICT:
- o = (smallt *) value->top;
- break;
- case TOP_IS_ARRAY:
- o = (smallt *) value->topA;
- break;
- }
+ switch(value->topIsA){
+ case SMALLJSON_IS_EMPTY:
+ o = (smallt *) allocSUndefined();
+ break;
+ case TOP_IS_UNDEFINED:
+ o = (smallt *) value->topU;
+ break;
+ case TOP_IS_BOOL:
+ o = (smallt *) value->topB;
+ break;
+ case TOP_IS_DOUBLE:
+ o = (smallt *) value->topD;
+ break;
+ case TOP_IS_INT:
+ o = (smallt *) value->topI;
+ break;
+ case TOP_IS_STRING:
+ o = (smallt *) value->topS;
+ break;
+ case TOP_IS_DICT:
+ o = (smallt *) value->top;
+ break;
+ case TOP_IS_ARRAY:
+ o = (smallt *) value->topA;
+ break;
}
sArraySetP(self->topA, index, o);
return(self);
@@ -4880,7 +4971,7 @@ internal smallJsont* setPAtSmallJsonSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setPAtSmallStringSmallJson(smallJsont *self, intmax_t index, smallStringt *string) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !string) {
return(NULL);
}
@@ -4899,7 +4990,7 @@ internal smallJsont* setPAtSmallStringSmallJson(smallJsont *self, intmax_t index
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -4911,7 +5002,7 @@ internal smallJsont* setPAtSmallStringSmallJson(smallJsont *self, intmax_t index
internal smallJsont* setPAtNFreeDictSmallJson(smallJsont *self, intmax_t index, smallDictt *dict) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !dict) {
return(NULL);
}
@@ -4929,11 +5020,6 @@ internal smallJsont* setPAtNFreeDictSmallJson(smallJsont *self, intmax_t index,
index = lenSmallJson(self) + index;
}
- if (!dict) {
- sArraySetP(self->topA, index, (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
@@ -4946,7 +5032,7 @@ internal smallJsont* setPAtNFreeDictSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setPAtNFreeArraySmallJson(smallJsont *self, intmax_t index, smallArrayt *array) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !array) {
return(NULL);
}
@@ -4964,11 +5050,6 @@ internal smallJsont* setPAtNFreeArraySmallJson(smallJsont *self, intmax_t index,
index = lenSmallJson(self) + index;
}
- if (!array) {
- sArraySetP(self->topA, index, (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -4981,7 +5062,7 @@ internal smallJsont* setPAtNFreeArraySmallJson(smallJsont *self, intmax_t index,
internal smallJsont* setPAtNFreeSmallJsonSmallJson(smallJsont *self, intmax_t index, smallJsont *value) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !value) {
return(NULL);
}
@@ -5000,36 +5081,31 @@ internal smallJsont* setPAtNFreeSmallJsonSmallJson(smallJsont *self, intmax_t in
}
smallt *o;
- if (!value) {
- o = (smallt *) allocSUndefined();
- }
- else {
- switch(value->topIsA){
- case SMALLJSON_IS_EMPTY:
- o = (smallt *) allocSUndefined();
- break;
- case TOP_IS_UNDEFINED:
- o = (smallt *) value->topU;
- break;
- case TOP_IS_BOOL:
- o = (smallt *) value->topB;
- break;
- case TOP_IS_DOUBLE:
- o = (smallt *) value->topD;
- break;
- case TOP_IS_INT:
- o = (smallt *) value->topI;
- break;
- case TOP_IS_STRING:
- o = (smallt *) value->topS;
- break;
- case TOP_IS_DICT:
- o = (smallt *) value->top;
- break;
- case TOP_IS_ARRAY:
- o = (smallt *) value->topA;
- break;
- }
+ switch(value->topIsA){
+ case SMALLJSON_IS_EMPTY:
+ o = (smallt *) allocSUndefined();
+ break;
+ case TOP_IS_UNDEFINED:
+ o = (smallt *) value->topU;
+ break;
+ case TOP_IS_BOOL:
+ o = (smallt *) value->topB;
+ break;
+ case TOP_IS_DOUBLE:
+ o = (smallt *) value->topD;
+ break;
+ case TOP_IS_INT:
+ o = (smallt *) value->topI;
+ break;
+ case TOP_IS_STRING:
+ o = (smallt *) value->topS;
+ break;
+ case TOP_IS_DICT:
+ o = (smallt *) value->top;
+ break;
+ case TOP_IS_ARRAY:
+ o = (smallt *) value->topA;
+ break;
}
sArraySetP(self->topA, index, o);
return(self);
@@ -5037,7 +5113,7 @@ internal smallJsont* setPAtNFreeSmallJsonSmallJson(smallJsont *self, intmax_t in
internal smallJsont* setPAtNFreeSmallStringSmallJson(smallJsont *self, intmax_t index, smallStringt *string) {
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !string) {
return(NULL);
}
@@ -5056,30 +5132,31 @@ internal smallJsont* setPAtNFreeSmallStringSmallJson(smallJsont *self, intmax_t
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
o = (smallt *) string->data;
- finishO(string);
}
+ finishO(string);
sArraySetP(self->topA, index, o);
return(self);
}
internal smallJsont* pushSmallJson(smallJsont *self, baset *value) {
+ if (!value) {
+ return(NULL);
+ }
+
switch(self->topIsA) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- }
- else {
- sArrayPushTiny(&(self->topA), toSmallt(value));
- }
+ sArrayPushTiny(&(self->topA), toSmallt(value));
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5094,6 +5171,8 @@ internal smallJsont* pushUndefinedSmallJson(smallJsont *self) {
o = (smallt *) allocSUndefined();
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5108,6 +5187,8 @@ internal smallJsont* pushBoolSmallJson(smallJsont *self, bool value) {
o = (smallt *) allocSBool(value);
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5122,6 +5203,8 @@ internal smallJsont* pushDoubleSmallJson(smallJsont *self, double value) {
o = (smallt *) allocSDouble(value);
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5136,6 +5219,8 @@ internal smallJsont* pushIntSmallJson(smallJsont *self, int64_t value) {
o = (smallt *) allocSInt(value);
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5143,20 +5228,19 @@ internal smallJsont* pushIntSmallJson(smallJsont *self, int64_t value) {
internal smallJsont* pushSSmallJson(smallJsont *self, const char *string) {
smallt *o = NULL;
+ if (!string) {
+ return(NULL);
+ }
+
switch(self->topIsA) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!string) {
- o = (smallt *) allocSStringTiny("");
- }
- else {
- o = (smallt *) allocSStringTiny(string);
- }
+ o = (smallt *) allocSStringTiny(string);
sArrayPushTiny(&(self->topA), o);
break;
case TOP_IS_STRING:
- if (!string || !*string) {
+ if (!*string) {
return(self);
}
@@ -5184,6 +5268,8 @@ internal smallJsont* pushSSmallJson(smallJsont *self, const char *string) {
strcat((char *)self->topS, string);
//TODO self->_len += len
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5196,6 +5282,10 @@ internal smallJsont* pushCharSmallJson(smallJsont *self, char c) {
internal smallJsont* pushDictSmallJson(smallJsont *self, smallDictt *dict) {
+ if (!dict) {
+ return(NULL);
+ }
+
if (checkObjectTypes && dict && !isOSmallDict(dict)) {
return(NULL);
}
@@ -5204,23 +5294,24 @@ internal smallJsont* pushDictSmallJson(smallJsont *self, smallDictt *dict) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!dict) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();;
}
sArrayPushTiny(&(self->topA), (smallt *)dict->d);
break;
+ default:
+ return(NULL);
}
return(self);
}
internal smallJsont* pushArraySmallJson(smallJsont *self, smallArrayt *array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (checkObjectTypes && array && !isOSmallArray(array)) {
return(NULL);
}
@@ -5229,11 +5320,6 @@ internal smallJsont* pushArraySmallJson(smallJsont *self, smallArrayt *array) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!array) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -5241,22 +5327,23 @@ internal smallJsont* pushArraySmallJson(smallJsont *self, smallArrayt *array) {
sArrayPushTiny(&(self->topA), (smallt *)array->a);
break;
+ default:
+ return(NULL);
}
return(self);
}
internal smallJsont* pushArraycSmallJson(smallJsont *self, char **array) {
+ if (!array) {
+ return(NULL);
+ }
+
switch(self->topIsA) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!array) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSArray());
- return(self);
- }
-
- sArrayt *a = allocSArray();
+ ;sArrayt *a = allocSArray();
forEachCharP(array, e) {
sStringt *s = allocSStringTiny(*e);
@@ -5264,6 +5351,8 @@ internal smallJsont* pushArraycSmallJson(smallJsont *self, char **array) {
}
sArrayPushTiny(&(self->topA), (smallt *) a);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5271,6 +5360,10 @@ internal smallJsont* pushArraycSmallJson(smallJsont *self, char **array) {
internal smallJsont* pushSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
smallt *o = NULL;
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallBool(value)) {
return(NULL);
}
@@ -5279,14 +5372,11 @@ internal smallJsont* pushSmallBoolSmallJson(smallJsont *self, smallBoolt *value)
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
o = (smallt *) value->value;
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5294,6 +5384,10 @@ internal smallJsont* pushSmallBoolSmallJson(smallJsont *self, smallBoolt *value)
internal smallJsont* pushSmallBytesSmallJson(smallJsont *self, smallBytest *value) {
smallt *o = NULL;
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallBytes(value)) {
return(NULL);
}
@@ -5302,7 +5396,7 @@ internal smallJsont* pushSmallBytesSmallJson(smallJsont *self, smallBytest *valu
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value || !value->B) {
+ if (!value->B) {
sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
return(self);
}
@@ -5310,6 +5404,8 @@ internal smallJsont* pushSmallBytesSmallJson(smallJsont *self, smallBytest *valu
o = (smallt *) value->B;
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5317,6 +5413,10 @@ internal smallJsont* pushSmallBytesSmallJson(smallJsont *self, smallBytest *valu
internal smallJsont* pushSmallDoubleSmallJson(smallJsont *self, smallDoublet *value) {
smallt *o = NULL;
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallDouble(value)) {
return(NULL);
}
@@ -5325,14 +5425,11 @@ internal smallJsont* pushSmallDoubleSmallJson(smallJsont *self, smallDoublet *va
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
o = (smallt *) value->value;
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5340,6 +5437,10 @@ internal smallJsont* pushSmallDoubleSmallJson(smallJsont *self, smallDoublet *va
internal smallJsont* pushSmallIntSmallJson(smallJsont *self, smallIntt *value) {
smallt *o = NULL;
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallInt(value)) {
return(NULL);
}
@@ -5348,14 +5449,11 @@ internal smallJsont* pushSmallIntSmallJson(smallJsont *self, smallIntt *value) {
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
o = (smallt *) value->value;
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5363,6 +5461,10 @@ internal smallJsont* pushSmallIntSmallJson(smallJsont *self, smallIntt *value) {
internal smallJsont* pushSmallJsonSmallJson(smallJsont *self, smallJsont *value) {
smallt *o = NULL;
+ if (!value) {
+ return(NULL);
+ }
+
if (checkObjectTypes && value && !isOSmallJson(value)) {
return(NULL);
}
@@ -5371,11 +5473,6 @@ internal smallJsont* pushSmallJsonSmallJson(smallJsont *self, smallJsont *value)
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!value) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
switch(value->topIsA){
case SMALLJSON_IS_EMPTY:
o = (smallt *) allocSUndefined();
@@ -5404,6 +5501,8 @@ internal smallJsont* pushSmallJsonSmallJson(smallJsont *self, smallJsont *value)
}
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5411,6 +5510,10 @@ internal smallJsont* pushSmallJsonSmallJson(smallJsont *self, smallJsont *value)
internal smallJsont* pushSmallStringSmallJson(smallJsont *self, smallStringt *string) {
smallt *o = NULL;
+ if (!string) {
+ return(NULL);
+ }
+
if (checkObjectTypes && string && !isOSmallString(string)) {
return(NULL);
}
@@ -5419,7 +5522,7 @@ internal smallJsont* pushSmallStringSmallJson(smallJsont *self, smallStringt *st
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -5428,7 +5531,7 @@ internal smallJsont* pushSmallStringSmallJson(smallJsont *self, smallStringt *st
sArrayPushTiny(&(self->topA), o);
break;
case TOP_IS_STRING:
- if (!string || !string->data) {
+ if (!string->data) {
return(self);
}
@@ -5454,6 +5557,8 @@ internal smallJsont* pushSmallStringSmallJson(smallJsont *self, smallStringt *st
strcat((char *)self->topS, sStringGetTiny(string->data));
//TODO self->_len += string->_len
break;
+ default:
+ return(NULL);
}
return(self);
}
@@ -5461,6 +5566,10 @@ internal smallJsont* pushSmallStringSmallJson(smallJsont *self, smallStringt *st
internal smallJsont* pushSmallContainerSmallJson(smallJsont *self, smallContainert *container) {
smallt *o = NULL;
+ if (!container) {
+ return(NULL);
+ }
+
if (checkObjectTypes && container && !isOSmallContainer(container)) {
return(NULL);
}
@@ -5469,11 +5578,6 @@ internal smallJsont* pushSmallContainerSmallJson(smallJsont *self, smallContaine
case SMALLJSON_IS_EMPTY:
self->topIsA = TOP_IS_ARRAY;
case TOP_IS_ARRAY:
- if (!container) {
- sArrayPushTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
if (!container->data) {
o = (smallt *) allocSContainer(NULL);
}
@@ -5482,29 +5586,54 @@ internal smallJsont* pushSmallContainerSmallJson(smallJsont *self, smallContaine
}
sArrayPushTiny(&(self->topA), o);
break;
+ default:
+ return(NULL);
}
return(self);
}
internal smallJsont* pushNFreeSmallJson(smallJsont *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
- pushSmallJson(self, value);
- finishO(value);
+ switch(self->topIsA) {
+ case SMALLJSON_IS_EMPTY:
+ self->topIsA = TOP_IS_ARRAY;
+ case TOP_IS_ARRAY:
+ o = toSmallt(value);
+ sArrayPushTiny(&(self->topA), o);
+ break;
+ default:
+ return(NULL);
+ }
+ if (!o) {
+ return(NULL);
+ }
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
+ }
return(self);
}
internal smallJsont* pushNFreeUndefinedSmallJson(smallJsont *self, undefinedt *undefined) {
- pushUndefinedSmallJson(self);
- terminateO(undefined);
- return(self);
+ smallJsont *r = pushUndefinedSmallJson(self);;
+ if (r) {
+ terminateO(undefined);
+ }
+ return(r);
}
internal smallJsont* pushNFreeSSmallJson(smallJsont *self, char *string) {
- pushSSmallJson(self, string);
- free(string);
- return(self);
+ smallJsont *r = pushSSmallJson(self, string);;
+ if (r) {
+ free(string);
+ }
+ return(r);
}
internal smallJsont* pushNFreeDictSmallJson(smallJsont *self, smallDictt *dict) {
@@ -5513,9 +5642,6 @@ internal smallJsont* pushNFreeDictSmallJson(smallJsont *self, smallDictt *dict)
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -5525,17 +5651,16 @@ internal smallJsont* pushNFreeArraySmallJson(smallJsont *self, smallArrayt *arra
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallJsont* pushNFreeArraycSmallJson(smallJsont *self, char **array) {
- pushArraycSmallJson(self, array);
- listFreeS(array);
- return(self);
+ smallJsont *r = pushArraycSmallJson(self, array);;
+ if (r) {
+ listFreeS(array);
+ }
+ return(r);
}
internal smallJsont* pushNFreeSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
@@ -5544,9 +5669,6 @@ internal smallJsont* pushNFreeSmallBoolSmallJson(smallJsont *self, smallBoolt *v
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5556,9 +5678,6 @@ internal smallJsont* pushNFreeSmallBytesSmallJson(smallJsont *self, smallBytest
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5568,9 +5687,6 @@ internal smallJsont* pushNFreeSmallDoubleSmallJson(smallJsont *self, smallDouble
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5580,9 +5696,6 @@ internal smallJsont* pushNFreeSmallIntSmallJson(smallJsont *self, smallIntt *val
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5592,9 +5705,6 @@ internal smallJsont* pushNFreeSmallJsonSmallJson(smallJsont *self, smallJsont *v
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -5604,9 +5714,6 @@ internal smallJsont* pushNFreeSmallStringSmallJson(smallJsont *self, smallString
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -5616,9 +5723,6 @@ internal smallJsont* pushNFreeSmallContainerSmallJson(smallJsont *self, smallCon
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
@@ -5848,33 +5952,67 @@ internal baset* popSmallJson(smallJsont *self) {
}
}
- if (o && (o->type == UNDEFINED)) {
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type == UNDEFINED) {
free(o);
return((baset*) allocUndefined());
}
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(o);
+ free(o);
+ return(r);
+ }
+ }
return(toBaset(o));
}
internal undefinedt* popUndefinedSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- undefinedt *e = (undefinedt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal bool popBoolSmallJson(smallJsont *self) {
- smallBoolt *e = NULL;
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->topA->count--;
+ return(allocUndefined());
+}
+
+internal bool popBoolSmallJson(smallJsont *self) {
+ smallBoolt *e = NULL;
bool r = false;;
e = popSmallBoolSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5887,10 +6025,6 @@ internal double popDoubleSmallJson(smallJsont *self) {
e = popSmallDoubleSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5903,10 +6037,6 @@ internal int64_t popIntSmallJson(smallJsont *self) {
e = popSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -5919,10 +6049,6 @@ internal int32_t popInt32SmallJson(smallJsont *self) {
e = popSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -5935,10 +6061,6 @@ internal uint64_t popUintSmallJson(smallJsont *self) {
e = popSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -5951,10 +6073,6 @@ internal uint32_t popUint32SmallJson(smallJsont *self) {
e = popSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -5967,10 +6085,6 @@ internal char* popSSmallJson(smallJsont *self) {
e = popSmallStringSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -5978,237 +6092,476 @@ internal char* popSSmallJson(smallJsont *self) {
}
internal smallDictt* popDictSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDictt *e = (smallDictt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal smallArrayt* popArraySmallJson(smallJsont *self) {
-
- smallArrayt *e = (smallArrayt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ len = lenSmallJson(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallBoolt* popSmallBoolSmallJson(smallJsont *self) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
- smallBoolt *e = (smallBoolt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-
-internal smallBytest* popSmallBytesSmallJson(smallJsont *self) {
- smallBytest *e = (smallBytest*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->topA->count--;
+ return((smallDictt*)toBaset(o));
}
-internal smallDoublet* popSmallDoubleSmallJson(smallJsont *self) {
+internal smallArrayt* popArraySmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDoublet *e = (smallDoublet*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-
-internal smallIntt* popSmallIntSmallJson(smallJsont *self) {
- smallIntt *e = (smallIntt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ len = lenSmallJson(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallJsont* popSmallJsonSmallJson(smallJsont *self) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
- baset *e = popSmallJson(self);
- if (!e) {
+ if (!o) {
return(NULL);
}
- createAllocateSmallJson(r);
- setTopNFreeSmallJson(r, e);
- return(r);
+
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->topA->count--;
+ return((smallArrayt*)toBaset(o));
}
-internal smallStringt* popSmallStringSmallJson(smallJsont *self) {
+internal smallBoolt* popSmallBoolSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallStringt *e = (smallStringt*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal void* popVoidSmallJson(smallJsont *self) {
- smallContainert *e = NULL;
- void* r = NULL;
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
- e = popSmallContainerSmallJson(self);
- if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
}
- r = e->f->get(e);
- finishO(e);
+ self->topA->count--;
}
- return(r);
-}
-internal smallContainert* popSmallContainerSmallJson(smallJsont *self) {
+ if (!o) {
+ return(NULL);
+ }
- smallContainert *e = (smallContainert*)popSmallJson(self);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+
+ // finish poping
+ self->topA->count--;
+ return((smallBoolt*)toBaset(o));
}
-internal double popNumSmallJson(smallJsont *self) {
+internal smallBytest* popSmallBytesSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- baset *o = popSmallJson(self);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
- if (!o) {
- return(0);
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
}
- double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
}
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+
+ if (!o) {
+ return(NULL);
}
- finishO(o);
- return(r);
-}
+ if (o->type != BYTES) {
+ return(NULL);
+ }
-internal smallJsont* prependSmallJson(smallJsont *self, baset *value) {
+ // finish poping
+ self->topA->count--;
+ return((smallBytest*)toBaset(o));
+}
+
+internal smallDoublet* popSmallDoubleSmallJson(smallJsont *self) {
+ size_t len;
smallt *o = NULL;
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- if (!value) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
}
- if (self->topIsA == SMALLJSON_IS_EMPTY) {
- self->topIsA = TOP_IS_ARRAY;
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
}
- o = toSmallt(value);;
- sArrayPrependTiny(&(self->topA), o);
- return(self);
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != DOUBLE) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->topA->count--;
+ return((smallDoublet*)toBaset(o));
}
-internal smallJsont* prependUndefinedSmallJson(smallJsont *self) {
+internal smallIntt* popSmallIntSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- smallt *o = (smallt *) allocSUndefined();
- sArrayPrependTiny(&(self->topA), o);
- return(self);
-}
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
-internal smallJsont* prependBoolSmallJson(smallJsont *self, bool value) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ if (!o) {
return(NULL);
}
- if (self->topIsA == SMALLJSON_IS_EMPTY) {
- self->topIsA = TOP_IS_ARRAY;
+ if (o->type != INT) {
+ return(NULL);
}
- smallt *o = (smallt *) allocSBool(value);
- sArrayPrependTiny(&(self->topA), o);
- return(self);
+ // finish poping
+ self->topA->count--;
+ return((smallIntt*)toBaset(o));
}
-internal smallJsont* prependDoubleSmallJson(smallJsont *self, double value) {
+internal smallJsont* popSmallJsonSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- if (self->topIsA == SMALLJSON_IS_EMPTY) {
- self->topIsA = TOP_IS_ARRAY;
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
}
- smallt *o = (smallt *) allocSDouble(value);
- sArrayPrependTiny(&(self->topA), o);
- return(self);
-}
-
-internal smallJsont* prependIntSmallJson(smallJsont *self, int64_t value) {
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ if (!o) {
return(NULL);
}
- if (self->topIsA == SMALLJSON_IS_EMPTY) {
- self->topIsA = TOP_IS_ARRAY;
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
}
- smallt *o = (smallt *) allocSInt(value);
- sArrayPrependTiny(&(self->topA), o);
- return(self);
+ // finish poping
+ self->topA->count--;
+
+ baset *e = toBaset(o);
+
+ createAllocateSmallJson(r);
+ setTopNFreeSmallJson(r, e);
+ return(r);
}
-internal smallJsont* prependSSmallJson(smallJsont *self, const char *string) {
+internal smallStringt* popSmallStringSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY && self->topIsA != TOP_IS_STRING) {
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- switch(self->topIsA) {
- case TOP_IS_ARRAY:
- if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->topA->count--;
+ return((smallStringt*)toBaset(o));
+}
+
+internal void* popVoidSmallJson(smallJsont *self) {
+ smallContainert *e = NULL;
+ void* r = NULL;
+
+ e = popSmallContainerSmallJson(self);
+ if (e) {
+ r = e->f->get(e);
+ finishO(e);
+ }
+ return(r);
+}
+
+internal smallContainert* popSmallContainerSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+
+ // finish poping
+ self->topA->count--;
+ return((smallContainert*)toBaset(o));
+}
+
+internal double popNumSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(0);
+ }
+
+ for (size_t i = len ; i != 0 ; i--) {
+ o = sArrayGetTiny(self->topA, self->topA->count -1);
+ if (o) {
+ break;
+ }
+ self->topA->count--;
+ }
+
+ if (!o) {
+ return(0);
+ }
+
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ baset *e = toBaset(o);
+
+ // finish poping
+ self->topA->count--;
+
+ double r = 0;
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
+ }
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
+ }
+ terminateO(e);
+ return(r);
+}
+
+
+internal smallJsont* prependSmallJson(smallJsont *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ self->topIsA = TOP_IS_ARRAY;
+ }
+
+ o = toSmallt(value);;
+ sArrayPrependTiny(&(self->topA), o);
+ return(self);
+}
+
+internal smallJsont* prependUndefinedSmallJson(smallJsont *self) {
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ smallt *o = (smallt *) allocSUndefined();
+ sArrayPrependTiny(&(self->topA), o);
+ return(self);
+}
+
+internal smallJsont* prependBoolSmallJson(smallJsont *self, bool value) {
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ self->topIsA = TOP_IS_ARRAY;
+ }
+
+ smallt *o = (smallt *) allocSBool(value);
+ sArrayPrependTiny(&(self->topA), o);
+ return(self);
+}
+
+internal smallJsont* prependDoubleSmallJson(smallJsont *self, double value) {
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ self->topIsA = TOP_IS_ARRAY;
+ }
+
+ smallt *o = (smallt *) allocSDouble(value);
+ sArrayPrependTiny(&(self->topA), o);
+ return(self);
+}
+
+internal smallJsont* prependIntSmallJson(smallJsont *self, int64_t value) {
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ self->topIsA = TOP_IS_ARRAY;
+ }
+
+ smallt *o = (smallt *) allocSInt(value);
+ sArrayPrependTiny(&(self->topA), o);
+ return(self);
+}
+
+internal smallJsont* prependSSmallJson(smallJsont *self, const char *string) {
+
+ if (!string) {
+ return(NULL);
+ }
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY && self->topIsA != TOP_IS_STRING) {
+ return(NULL);
+ }
+
+ switch(self->topIsA) {
+ case TOP_IS_ARRAY:
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
self->topIsA = TOP_IS_ARRAY;
}
smallt *o;
- if (!string) {
- // create an empty sStringt instead of NULL
- o = (smallt *) allocSStringTiny("");
- }
- else {
- o = (smallt *) allocSStringTiny(string);
- }
+ o = (smallt *) allocSStringTiny(string);
sArrayPrependTiny(&(self->topA), o);
break;
case TOP_IS_STRING:
- if (!string) {
- return(self);
- }
-
- size_t len = strlen(string);
+ ;size_t len = strlen(string);
if (!self->topS) {
sStringSetTiny(&self->topS, string);
@@ -6235,6 +6588,10 @@ internal smallJsont* prependCharSmallJson(smallJsont *self, char c) {
internal smallJsont* prependDictSmallJson(smallJsont *self, smallDictt *dict) {
+ if (!dict) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6247,11 +6604,6 @@ internal smallJsont* prependDictSmallJson(smallJsont *self, smallDictt *dict) {
self->topIsA = TOP_IS_ARRAY;
}
- if (!dict) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSDict());
- return(self);
- }
-
if (!dict->d) {
dict->d = allocSDict();
}
@@ -6263,6 +6615,10 @@ internal smallJsont* prependDictSmallJson(smallJsont *self, smallDictt *dict) {
internal smallJsont* prependArraySmallJson(smallJsont *self, smallArrayt *array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6275,11 +6631,6 @@ internal smallJsont* prependArraySmallJson(smallJsont *self, smallArrayt *array)
self->topIsA = TOP_IS_ARRAY;
}
- if (!array) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSArray());
- return(self);
- }
-
if (!array->a) {
// allocate empty array
array->a = allocSArray();
@@ -6291,6 +6642,10 @@ internal smallJsont* prependArraySmallJson(smallJsont *self, smallArrayt *array)
internal smallJsont* prependArraycSmallJson(smallJsont *self, char **array) {
+ if (!array) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6299,11 +6654,6 @@ internal smallJsont* prependArraycSmallJson(smallJsont *self, char **array) {
self->topIsA = TOP_IS_ARRAY;
}
- if (!array) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSArray());
- return(self);
- }
-
sArrayt *a = allocSArray();
forEachCharP(array, e) {
@@ -6316,6 +6666,10 @@ internal smallJsont* prependArraycSmallJson(smallJsont *self, char **array) {
internal smallJsont* prependSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6328,11 +6682,6 @@ internal smallJsont* prependSmallBoolSmallJson(smallJsont *self, smallBoolt *val
self->topIsA = TOP_IS_ARRAY;
}
- if (!value) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArrayPrependTiny(&(self->topA), o);
return(self);
@@ -6340,6 +6689,10 @@ internal smallJsont* prependSmallBoolSmallJson(smallJsont *self, smallBoolt *val
internal smallJsont* prependSmallBytesSmallJson(smallJsont *self, smallBytest *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6352,7 +6705,7 @@ internal smallJsont* prependSmallBytesSmallJson(smallJsont *self, smallBytest *v
self->topIsA = TOP_IS_ARRAY;
}
- if (!value || !value->B) {
+ if (!value->B) {
sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
return(self);
}
@@ -6364,6 +6717,10 @@ internal smallJsont* prependSmallBytesSmallJson(smallJsont *self, smallBytest *v
internal smallJsont* prependSmallDoubleSmallJson(smallJsont *self, smallDoublet *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6376,11 +6733,6 @@ internal smallJsont* prependSmallDoubleSmallJson(smallJsont *self, smallDoublet
self->topIsA = TOP_IS_ARRAY;
}
- if (!value) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArrayPrependTiny(&(self->topA), o);
return(self);
@@ -6388,6 +6740,10 @@ internal smallJsont* prependSmallDoubleSmallJson(smallJsont *self, smallDoublet
internal smallJsont* prependSmallIntSmallJson(smallJsont *self, smallIntt *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6400,11 +6756,6 @@ internal smallJsont* prependSmallIntSmallJson(smallJsont *self, smallIntt *value
self->topIsA = TOP_IS_ARRAY;
}
- if (!value) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = (smallt *) value->value;
sArrayPrependTiny(&(self->topA), o);
return(self);
@@ -6412,6 +6763,10 @@ internal smallJsont* prependSmallIntSmallJson(smallJsont *self, smallIntt *value
internal smallJsont* prependSmallJsonSmallJson(smallJsont *self, smallJsont *value) {
+ if (!value) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6424,11 +6779,6 @@ internal smallJsont* prependSmallJsonSmallJson(smallJsont *self, smallJsont *val
self->topIsA = TOP_IS_ARRAY;
}
- if (!value) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
smallt *o = NULL;
switch(value->topIsA){
case SMALLJSON_IS_EMPTY:
@@ -6462,6 +6812,10 @@ internal smallJsont* prependSmallJsonSmallJson(smallJsont *self, smallJsont *val
internal smallJsont* prependSmallStringSmallJson(smallJsont *self, smallStringt *string) {
+ if (!string) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY && self->topIsA != TOP_IS_STRING) {
return(NULL);
}
@@ -6477,7 +6831,7 @@ internal smallJsont* prependSmallStringSmallJson(smallJsont *self, smallStringt
}
smallt *o;
- if (!string || !string->data) {
+ if (!string->data) {
o = (smallt *) allocSStringTiny("");
}
else {
@@ -6486,7 +6840,7 @@ internal smallJsont* prependSmallStringSmallJson(smallJsont *self, smallStringt
sArrayPrependTiny(&(self->topA), o);
break;
case TOP_IS_STRING:
- if (!string || !string->data) {
+ if (!string->data) {
return(self);
}
@@ -6510,6 +6864,10 @@ internal smallJsont* prependSmallStringSmallJson(smallJsont *self, smallStringt
internal smallJsont* prependSmallContainerSmallJson(smallJsont *self, smallContainert *container) {
smallt *o = NULL;
+ if (!container) {
+ return(NULL);
+ }
+
if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -6522,11 +6880,6 @@ internal smallJsont* prependSmallContainerSmallJson(smallJsont *self, smallConta
self->topIsA = TOP_IS_ARRAY;
}
- if (!container) {
- sArrayPrependTiny(&(self->topA), (smallt *)allocSUndefined());
- return(self);
- }
-
if (!container->data) {
o = (smallt *) allocSContainer(NULL);
}
@@ -6539,24 +6892,45 @@ internal smallJsont* prependSmallContainerSmallJson(smallJsont *self, smallConta
internal smallJsont* prependNFreeSmallJson(smallJsont *self, baset *value) {
+ smallt *o = NULL;
+
+ if (!value) {
+ return(NULL);
+ }
+
+ if (self->topIsA != SMALLJSON_IS_EMPTY && self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (self->topIsA == SMALLJSON_IS_EMPTY) {
+ self->topIsA = TOP_IS_ARRAY;
+ }
+
+ o = toSmallt(value);;
+ sArrayPrependTiny(&(self->topA), o);
- prependSmallJson(self, value);
- finishO(value);
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(value);
+ }
return(self);
}
internal smallJsont* prependNFreeUndefinedSmallJson(smallJsont *self, undefinedt *undefined) {
- prependUndefinedSmallJson(self);
- terminateO(undefined);
- return(self);
+ smallJsont *r = prependUndefinedSmallJson(self);;
+ if (r) {
+ terminateO(undefined);
+ }
+ return(r);
}
internal smallJsont* prependNFreeSSmallJson(smallJsont *self, char *string) {
- prependSSmallJson(self, string);
- free(string);
- return(self);
+ smallJsont *r = prependSSmallJson(self, string);;
+ if (r) {
+ free(string);
+ }
+ return(r);
}
internal smallJsont* prependNFreeDictSmallJson(smallJsont *self, smallDictt *dict) {
@@ -6565,9 +6939,6 @@ internal smallJsont* prependNFreeDictSmallJson(smallJsont *self, smallDictt *dic
if (r) {
finishO(dict);
}
- else {
- terminateO(dict);
- }
return(r);
}
@@ -6577,17 +6948,16 @@ internal smallJsont* prependNFreeArraySmallJson(smallJsont *self, smallArrayt *a
if (r) {
finishO(array);
}
- else {
- terminateO(array);
- }
return(r);
}
internal smallJsont* prependNFreeArraycSmallJson(smallJsont *self, char **array) {
- prependArraycSmallJson(self, array);
- listFreeS(array);
- return(self);
+ smallJsont *r = prependArraycSmallJson(self, array);;
+ if (r) {
+ listFreeS(array);
+ }
+ return(r);
}
internal smallJsont* prependNFreeSmallBoolSmallJson(smallJsont *self, smallBoolt *value) {
@@ -6596,9 +6966,6 @@ internal smallJsont* prependNFreeSmallBoolSmallJson(smallJsont *self, smallBoolt
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -6608,9 +6975,6 @@ internal smallJsont* prependNFreeSmallBytesSmallJson(smallJsont *self, smallByte
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -6620,9 +6984,6 @@ internal smallJsont* prependNFreeSmallDoubleSmallJson(smallJsont *self, smallDou
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -6632,9 +6993,6 @@ internal smallJsont* prependNFreeSmallIntSmallJson(smallJsont *self, smallIntt *
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -6644,9 +7002,6 @@ internal smallJsont* prependNFreeSmallJsonSmallJson(smallJsont *self, smallJsont
if (r) {
finishO(value);
}
- else {
- terminateO(value);
- }
return(r);
}
@@ -6656,9 +7011,6 @@ internal smallJsont* prependNFreeSmallStringSmallJson(smallJsont *self, smallStr
if (r) {
finishO(string);
}
- else {
- terminateO(string);
- }
return(r);
}
@@ -6668,9 +7020,6 @@ internal smallJsont* prependNFreeSmallContainerSmallJson(smallJsont *self, small
if (r) {
finishO(container);
}
- else {
- terminateO(container);
- }
return(r);
}
@@ -6694,21 +7043,65 @@ internal baset* dequeueSmallJson(smallJsont *self) {
}
}
- if (o && (o->type == UNDEFINED)) {
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type == UNDEFINED) {
free(o);
return((baset*) allocUndefined());
}
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(o);
+ free(o);
+ return(r);
+ }
+ }
return(toBaset(o));
}
internal undefinedt* dequeueUndefinedSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- undefinedt *e = (undefinedt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != UNDEFINED) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return(allocUndefined());
}
internal bool dequeueBoolSmallJson(smallJsont *self) {
@@ -6717,10 +7110,6 @@ internal bool dequeueBoolSmallJson(smallJsont *self) {
e = dequeueSmallBoolSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -6733,10 +7122,6 @@ internal double dequeueDoubleSmallJson(smallJsont *self) {
e = dequeueSmallDoubleSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -6749,10 +7134,6 @@ internal int64_t dequeueIntSmallJson(smallJsont *self) {
e = dequeueSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -6765,10 +7146,6 @@ internal int32_t dequeueInt32SmallJson(smallJsont *self) {
e = dequeueSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -6781,10 +7158,6 @@ internal uint64_t dequeueUintSmallJson(smallJsont *self) {
e = dequeueSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -6797,10 +7170,6 @@ internal uint32_t dequeueUint32SmallJson(smallJsont *self) {
e = dequeueSmallIntSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -6813,10 +7182,6 @@ internal char* dequeueSSmallJson(smallJsont *self) {
e = dequeueSmallStringSmallJson(self);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -6824,159 +7189,464 @@ internal char* dequeueSSmallJson(smallJsont *self) {
}
internal smallDictt* dequeueDictSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDictt *e = (smallDictt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-
-internal smallArrayt* dequeueArraySmallJson(smallJsont *self) {
- smallArrayt *e = (smallArrayt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ len = lenSmallJson(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallBoolt* dequeueSmallBoolSmallJson(smallJsont *self) {
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
- smallBoolt *e = (smallBoolt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (!o) {
return(NULL);
}
- return(e);
-}
-internal smallBytest* dequeueSmallBytesSmallJson(smallJsont *self) {
-
- smallBytest *e = (smallBytest*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallDictt*) toBaset(o));
}
-internal smallDoublet* dequeueSmallDoubleSmallJson(smallJsont *self) {
+internal smallArrayt* dequeueArraySmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallDoublet *e = (smallDoublet*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-
-internal smallIntt* dequeueSmallIntSmallJson(smallJsont *self) {
- smallIntt *e = (smallIntt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ len = lenSmallJson(self);
+ if (!len) {
return(NULL);
}
- return(e);
-}
-internal smallJsont* dequeueSmallJsonSmallJson(smallJsont *self) {
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
- smallJsont *e = (smallJsont*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallJson(e)) {
- terminateO(e);
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallArrayt*) toBaset(o));
}
-internal smallStringt* dequeueSmallStringSmallJson(smallJsont *self) {
+internal smallBoolt* dequeueSmallBoolSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- smallStringt *e = (smallStringt*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal void* dequeueVoidSmallJson(smallJsont *self) {
- smallContainert *e = NULL;
- void* r = NULL;
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
- e = dequeueSmallContainerSmallJson(self);
- if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
- r = e->f->get(e);
- finishO(e);
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
}
- return(r);
-}
+ }
-internal smallContainert* dequeueSmallContainerSmallJson(smallJsont *self) {
+ if (!o) {
+ return(NULL);
+ }
- smallContainert *e = (smallContainert*)dequeueSmallJson(self);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallBoolt*) toBaset(o));
}
-internal smallJsont* reverseSmallJson(smallJsont *self) {
+internal smallBytest* dequeueSmallBytesSmallJson(smallJsont *self) {
size_t len;
+ smallt *o = NULL;
if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
len = lenSmallJson(self);
-
- if (len < 2) {
- // empty or 1 element list
- return(self);
+ if (!len) {
+ return(NULL);
}
- sArrayReverseTiny(self->topA);
- return(self);
-}
-
-internal double dequeueNumSmallJson(smallJsont *self) {
-
- baset *o = dequeueSmallJson(self);
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
if (!o) {
- return(0);
+ return(NULL);
}
- double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
+ if (o->type != BYTES) {
+ return(NULL);
}
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
}
- finishO(o);
- return(r);
+ self->topA->count -= i+1;;
+
+ return((smallBytest*) toBaset(o));
}
-internal smallJsont* catSmallJson(smallJsont *self, ...) {
+internal smallDoublet* dequeueSmallDoubleSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
- switch(self->topIsA) {
- case TOP_IS_ARRAY:
- ;va_list pl;
- smallArrayt *paramType;
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
- // add arguments to a list
- va_start(pl, self);
- paramType = va_arg(pl, smallArrayt*);
- while (paramType) {
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != DOUBLE) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallDoublet*) toBaset(o));
+}
+
+internal smallIntt* dequeueSmallIntSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != INT) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallIntt*) toBaset(o));
+}
+
+internal smallJsont* dequeueSmallJsonSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ baset *e = toBaset(o);
+
+ createAllocateSmallJson(r);
+ setTopNFreeSmallJson(r, e);
+ return(r);
+}
+
+internal smallStringt* dequeueSmallStringSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != STRING) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallStringt*) toBaset(o));
+}
+
+internal void* dequeueVoidSmallJson(smallJsont *self) {
+ smallContainert *e = NULL;
+ void* r = NULL;
+
+ e = dequeueSmallContainerSmallJson(self);
+ if (e) {
+ r = e->f->get(e);
+ finishO(e);
+ }
+ return(r);
+}
+
+internal smallContainert* dequeueSmallContainerSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(NULL);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ return((smallContainert*) toBaset(o));
+}
+
+internal double dequeueNumSmallJson(smallJsont *self) {
+ size_t len;
+ smallt *o = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ len = lenSmallJson(self);
+ if (!len) {
+ return(0);
+ }
+
+ size_t i;
+ for (i = 0 ; i < len ; i++) {
+ o = sArrayGetTiny(self->topA, i);
+ if (o) {
+ break;
+ }
+ }
+
+ if (!o) {
+ return(0);
+ }
+
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ // finish dequeuing
+ smallt **arr = &(self->topA->data);
+ // shift list
+ for (uint32_t j = i+1 ; j < self->topA->count ; j++) {
+ arr[j-i-1] = arr[j];
+ }
+ self->topA->count -= i+1;;
+
+ baset *e = toBaset(o);
+
+ double r = 0;
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
+ }
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
+ }
+ finishO(e);
+ return(r);
+}
+
+internal smallJsont* reverseSmallJson(smallJsont *self) {
+ size_t len;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+
+ if (len < 2) {
+ // empty or 1 element list
+ return(self);
+ }
+
+ sArrayReverseTiny(self->topA);
+ return(self);
+}
+
+internal smallJsont* catSmallJson(smallJsont *self, ...) {
+
+ switch(self->topIsA) {
+ case TOP_IS_ARRAY:
+ ;va_list pl;
+ smallArrayt *paramType;
+
+ // add arguments to a list
+ va_start(pl, self);
+ paramType = va_arg(pl, smallArrayt*);
+ while (paramType) {
smallJsont *r = appendSmallJson(self, paramType);;
if (!r) {
va_end(pl);
@@ -7243,6 +7913,7 @@ internal smallJsont* appendNSmashArraySmallJson(smallJsont *self, char **array)
}
if (!*array) {
+ free(array);
return(self);
}
@@ -7288,7 +7959,7 @@ internal smallJsont* addSmallJson(smallJsont *self, smallArrayt *array) {
}
if (!array) {
- return(NULL);
+ return(duplicateSmallJson(self));
}
if (checkObjectTypes && !isOSmallArray(array)) {
@@ -7324,7 +7995,7 @@ internal smallJsont* addJsonSmallJson(smallJsont *self, smallJsont *array) {
}
if (!array) {
- return(NULL);
+ return(duplicateSmallJson(self));
}
if (checkObjectTypes && !isOSmallJson(array)) {
@@ -7428,31 +8099,33 @@ internal smallJsont* sliceSmallJson(smallJsont *self, intmax_t start, intmax_t e
return(self);
}
-internal smallJsont* copySmallJson(smallJsont *self, intmax_t start, intmax_t end) {
- size_t len;
+
+internal smallJsont* cropSmallJson(smallJsont *self, intmax_t start, intmax_t end) {
+ intmax_t len;
+ intmax_t n;
+ char *l = NULL;
smallt *o = NULL;
- char *s = NULL;
if (self->topIsA != TOP_IS_ARRAY && self->topIsA != TOP_IS_STRING) {
return(NULL);
}
len = lenSmallJson(self);
- // sanity checks
+
if (!len) {
return(NULL);
}
- if (start >= (intmax_t)len) {
+ if (start > len) {
return(NULL);
}
- if (end > (intmax_t)len) {
+ if (end > len) {
end = len;
}
- if (start <= -(intmax_t)len) {
+ if (start <= -len) {
start = -len;
}
- if (end <= -(intmax_t)len) {
+ if (end <= -len) {
return(NULL);
}
if (start < 0) {
@@ -7465,27 +8138,1775 @@ internal smallJsont* copySmallJson(smallJsont *self, intmax_t start, intmax_t en
return(NULL);
}
- createAllocateSmallJson(r);
- switch(self->topIsA) {
- case TOP_IS_ARRAY:
- r->f->setTypeArray(r);
+ smallJsont *r = NULL;
- if (start == end) {
- // empty list
- return(r);
- }
- else {
+ if (start < end) {
+ initiateAllocateSmallJson(&r);
+ n = end - start;
+ switch(self->topIsA) {
+ case TOP_IS_ARRAY:
// start < end < len
- intmax_t n;
- n = end - start;
-
+ setTypeArraySmallJson(r);
for (intmax_t i=0;i < n;i++) {
o = sArrayGetTiny(self->topA, start+i);
- sArrayPushTiny(&(r->topA), sDuplicate(o));
- }
+ sArrayPushTiny(&(r->topA), o);
}
- break;
- case TOP_IS_STRING:
+
+ // copy pointers from range end, array->count to start
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - end) ; i ++) {
+ arr[start+i] = arr[end + i];
+ }
+
+ self->topA->count -= end - start;
+ break;
+ case TOP_IS_STRING:
+ // start < end < len
+ l = malloc((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ char *string = sStringGetTiny(self->topS);
+ strLCpy(l, (n+1) * sizeof(char), string+start);
+ strLCpy(string+start, len-end+1, string+end);
+ // TODO self->_len -= n
+
+ setTopStringO(r, l);
+ free(l);
+ break;
+ }
+ }
+ return(r);
+}
+
+
+internal char* cropSSmallJson(smallJsont *self, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ if (self->topIsA != TOP_IS_STRING) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+
+ if (!len) {
+ return(NULL);
+ }
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = malloc((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ char *string = sStringGetTiny(self->topS);
+ strLCpy(l, (n+1) * sizeof(char), string+start);
+ strLCpy(string+start, len-end+1, string+end);
+ // TODO self->_len -= n
+ }
+
+ return(l);
+}
+
+
+internal smallStringt* cropSmallStringSmallJson(smallJsont *self, intmax_t start, intmax_t end) {
+
+ char *cropped = cropSSmallJson(self, start, end);
+
+ if (!cropped) {
+ return(NULL);
+ }
+
+ smallStringt *r = allocSmallString(cropped);
+ free(cropped);
+ return(r);
+}
+
+
+internal baset* cropElemAtSmallJson(smallJsont *self, intmax_t index) {
+ baset *r = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+
+ if (o->type == UNDEFINED) {
+ free(o);
+ r = (baset*) allocUndefined();
+ goto removeElem;
+ }
+ else if (o->type == CONTAINER) {
+ cast(sContainert*, sc, o);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ r = toBaset(o);
+ free(o);
+ goto removeElem;
+ }
+ }
+ r = toBaset(o);;
+
+ removeElem:;
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal undefinedt* cropElemAtUndefinedSmallJson(smallJsont *self, intmax_t index) {
+ undefinedt *r = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+
+ free(o);
+ r = allocUndefined();
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+internal bool cropElemAtBoolSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(false);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(false);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(false);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ bool r = false;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(false);
+ }
+ smallBoolt *e = (smallBoolt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallBool(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(false);
+ }
+ finishO(e);
+ return(false);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal double cropElemAtDoubleSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ double r = 0;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(0);
+ }
+ smallDoublet *e = (smallDoublet*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallDouble(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal int64_t cropElemAtIntSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ int64_t r = 0;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal int32_t cropElemAtInt32SmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ int32_t r = 0;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal uint64_t cropElemAtUintSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ uint64_t r = 0;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal uint32_t cropElemAtUint32SmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ uint32_t r = 0;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(0);
+ }
+ smallIntt *e = (smallIntt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallInt(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(e);
+ return(0);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal char* cropElemAtSSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ char *r = NULL;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallStringt *e = (smallStringt*)toBaset(o);
+ if (e) {
+ if (checkObjectTypes && !isOSmallString(e)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(e);
+ return(NULL);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal char cropElemAtCharSmallJson(smallJsont *self, intmax_t index) {
+ intmax_t len;
+
+ if (self->topIsA != TOP_IS_STRING) {
+ return(0);
+ }
+
+ // sanity checks
+ if (!self->topS) {
+ return(0);
+ }
+
+ len = lenSmallJson(self);
+ if (index >= len) {
+ return(0);
+ }
+ if (index < -len) {
+ return(0);
+ }
+ if (index < 0) {
+ index = len + index;
+ }
+
+ char *string = sStringGetTiny(self->topS);
+
+ char r = *(string+index);
+
+ if (index == len-1) {
+ string[len-1] = 0;
+ }
+ else {
+ strLCpy(string+index, len-1, string+index+1);
+ }
+
+ return(r);
+}
+
+
+internal smallDictt* cropElemAtDictSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallDictt *r = (smallDictt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallDict(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallArrayt* cropElemAtArraySmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallArrayt *r = (smallArrayt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallArray(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallBoolt* cropElemAtSmallBoolSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallBoolt *r = (smallBoolt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallBool(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallBytest* cropElemAtSmallBytesSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallBytest *r = (smallBytest*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallBytes(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallDoublet* cropElemAtSmallDoubleSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallDoublet *r = (smallDoublet*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallDouble(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallIntt* cropElemAtSmallIntSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallIntt *r = (smallIntt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallInt(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallJsont* cropElemAtSmallJsonSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+ baset *e = toBaset(o);
+ if (!e) {
+ finishO(e);
+ return(NULL);
+ }
+ createAllocateSmallJson(r);
+ setTopNFreeSmallJson(r, e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal smallStringt* cropElemAtSmallStringSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallStringt *r = (smallStringt*)toBaset(o);
+ if (checkObjectTypes && r && !isOSmallString(r)) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal void* cropElemAtVoidSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ void *r = NULL;
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallContainert *e = (smallContainert*)toBaset(o);
+ if (e) {
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && !isOSmallContainer(e)) {
+ finishO(e);
+ return(false);
+ }
+ r = e->f->get(e);
+ finishO(e);
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+ }
+
+ return(r);
+}
+
+
+internal smallContainert* cropElemAtSmallContainerSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ smallContainert *r = (smallContainert*)toBaset(o);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && r && !isOSmallContainer(r)) {
+ finishO(r);
+ return(NULL);
+ }
+
+ // copy pointers from range index+1, array->count to index
+ smallt **arr = &(self->topA->data);
+
+ for (uint32_t i = 0 ; i < (self->topA->count - (index+1)) ; i ++) {
+ arr[index+i] = arr[index+1 + i];
+ }
+
+ self->topA->count--;
+
+ return(r);
+}
+
+
+internal baset* cropElemKeySmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ if (!sm) {
+ return(NULL);
+ }
+ if (sm->type == UNDEFINED) {
+ free(sm);
+ return((baset*) allocUndefined());
+ }
+ else if (sm->type == CONTAINER) {
+ cast(sContainert*, sc, sm);
+ if (sc->dataType == SH_DT_BASET) {
+ // baset object in stored in the container, free the container since
+ // it was allocated automatically in the toSmallt function in libsheepyObject.c
+ baset *r = toBaset(sm);
+ free(sm);
+ return(r);
+ }
+ }
+ return(toBaset(sm));
+}
+
+
+internal undefinedt* cropElemKeyUndefinedSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ undefinedt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && eqS(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ if (sm->type != UNDEFINED) {
+ return(NULL);
+ }
+ free(e->data);
+ free(e->key);
+ e->key = NULL;
+ r = (undefinedt*) allocUndefined();
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal bool cropElemKeyBoolSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(no);
+ }
+
+ if (!key || !self->top) {
+ return(false);
+ }
+
+ smallt *sm = NULL;
+ smallBoolt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(no);
+ }
+ o = (smallBoolt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallBool(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(no);
+ }
+ finishO(o);
+ return(false);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ bool r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(false);
+}
+
+
+internal double cropElemKeyDoubleSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(0);
+ }
+
+ if (!key || !self->top) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallDoublet *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(0);
+ }
+ o = (smallDoublet*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallDouble(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ double r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+
+internal int64_t cropElemKeyIntSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(0);
+ }
+
+ if (!key || !self->top) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(0);
+ }
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ int64_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+
+internal int32_t cropElemKeyInt32SmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(0);
+ }
+
+ if (!key || !self->top) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(0);
+ }
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ int32_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+
+internal uint64_t cropElemKeyUintSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(0);
+ }
+
+ if (!key || !self->top) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(0);
+ }
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ uint64_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+
+internal uint32_t cropElemKeyUint32SmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(0);
+ }
+
+ if (!key || !self->top) {
+ return(0);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(0);
+ }
+ o = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallInt(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(0);
+ }
+ finishO(o);
+ return(0);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ uint32_t r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(0);
+}
+
+
+internal char* cropElemKeySSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallStringt *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ o = (smallStringt*)toBaset(sm);
+ if (checkObjectTypes && o && !isOSmallString(o)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ char *r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(NULL);
+}
+
+
+internal smallDictt* cropElemKeyDictSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallDictt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallDictt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallDict(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallArrayt* cropElemKeyArraySmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallArrayt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallArrayt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallArray(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallBoolt* cropElemKeySmallBoolSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallBoolt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallBoolt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallBool(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallBytest* cropElemKeySmallBytesSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallBytest *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallBytest*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallBytes(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallDoublet* cropElemKeySmallDoubleSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallDoublet *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallDoublet*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallDouble(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallIntt* cropElemKeySmallIntSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallIntt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallIntt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallInt(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal smallJsont* cropElemKeySmallJsonSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ if ((sm->type == BYTES) || (sm->type == CONTAINER)) {
+ return(NULL);
+ }
+ baset *o = toBaset(sm);
+ if (!o) {
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ createAllocateSmallJson(r);
+ setTopNFreeO(r, o);
+ return(r);
+ }
+ }
+
+ return(NULL);
+}
+
+
+internal smallStringt* cropElemKeySmallStringSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallStringt *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallStringt*)toBaset(sm);
+ if (checkObjectTypes && r && !isOSmallString(r)) {
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+internal void* cropElemKeyVoidSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallContainert *o = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ o = (smallContainert*)toBaset(sm);
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && o && !isOSmallContainer(o)) {
+ finishO(o);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+
+ void *r = o->f->get(o);
+ finishO(o);
+ return(r);
+ }
+ }
+
+ return(NULL);
+}
+
+
+internal smallContainert* cropElemKeySmallContainerSmallJson(smallJsont *self, char* key) {
+
+ if (self->topIsA != TOP_IS_DICT) {
+ return(NULL);
+ }
+
+ if (!key || !self->top) {
+ return(NULL);
+ }
+
+ smallt *sm = NULL;
+ smallContainert *r = NULL;
+ forEachSDict(self->top, e) {
+ if (e->key && strEq(key, e->key)) {
+ sm = e->data;
+ if (!sm) {
+ return(NULL);
+ }
+ r = (smallContainert*)toBaset(sm);
+ if ((sm->type == CONTAINER) && (((sContainert*)sm)->dataType == SH_DT_BASET)) {
+ return(NULL);
+ }
+ if (checkObjectTypes && r && !isOSmallContainer(r)) {
+ finishO(r);
+ return(NULL);
+ }
+ free(e->key);
+ e->key = NULL;
+ break;
+ }
+ }
+
+ return(r);
+}
+
+
+
+internal smallJsont* copySmallJson(smallJsont *self, intmax_t start, intmax_t end) {
+ size_t len;
+ smallt *o = NULL;
+ char *s = NULL;
+
+ if (self->topIsA != TOP_IS_ARRAY && self->topIsA != TOP_IS_STRING) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+ // sanity checks
+ if (!len) {
+ return(NULL);
+ }
+
+ if (start >= (intmax_t)len) {
+ return(NULL);
+ }
+ if (end > (intmax_t)len) {
+ end = len;
+ }
+ if (start <= -(intmax_t)len) {
+ start = -len;
+ }
+ if (end <= -(intmax_t)len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ createAllocateSmallJson(r);
+ switch(self->topIsA) {
+ case TOP_IS_ARRAY:
+ r->f->setTypeArray(r);
+
+ if (start == end) {
+ // empty list
+ return(r);
+ }
+ else {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+
+ for (intmax_t i=0;i < n;i++) {
+ o = sArrayGetTiny(self->topA, start+i);
+ sArrayPushTiny(&(r->topA), sDuplicate(o));
+ }
+ }
+ break;
+ case TOP_IS_STRING:
r->f->setTypeString(r);
intmax_t n;
@@ -7516,7 +9937,7 @@ internal smallJsont* insertSmallJson(smallJsont *self, intmax_t index, smallArra
size_t len;;
//sanity checks
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !toInsert) {
return(NULL);
}
@@ -7524,10 +9945,6 @@ internal smallJsont* insertSmallJson(smallJsont *self, intmax_t index, smallArra
return(NULL);
}
- if (!toInsert || !toInsert->f->len(toInsert)) {
- return(NULL);
- }
-
len = lenSmallJson(self);
if (!len && index == -1) {
@@ -7552,6 +9969,10 @@ internal smallJsont* insertSmallJson(smallJsont *self, intmax_t index, smallArra
index = len + index;
}
+ if (!toInsert->f->len(toInsert)) {
+ return(self);
+ }
+
sArrayt *a = allocSArray();;
@@ -7592,14 +10013,9 @@ internal smallJsont* insertNSmashSmallJson(smallJsont *self, intmax_t index, sma
smallJsont *r = NULL;
r = insertSmallJson(self, index, toInsert);
- if (toInsert) {
- if (r) {
- smashO(toInsert);
- }
- else {
- terminateO(toInsert);
+ if (r) {
+ smashO(toInsert);
}
- }
return(r);
}
@@ -7607,7 +10023,7 @@ internal smallJsont* insertJsonSmallJson(smallJsont *self, intmax_t index, small
size_t len;;
//sanity checks
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !toInsert) {
return(NULL);
}
@@ -7615,10 +10031,6 @@ internal smallJsont* insertJsonSmallJson(smallJsont *self, intmax_t index, small
return(NULL);
}
- if (!toInsert || toInsert->topIsA != TOP_IS_ARRAY || !toInsert->f->len(toInsert)) {
- return(NULL);
- }
-
len = lenSmallJson(self);
if (!len && index == -1) {
@@ -7643,6 +10055,10 @@ internal smallJsont* insertJsonSmallJson(smallJsont *self, intmax_t index, small
index = len + index;
}
+ if (toInsert->topIsA != TOP_IS_ARRAY || !toInsert->f->len(toInsert)) {
+ return(self);
+ }
+
sArrayt *a = allocSArray();;
@@ -7683,14 +10099,9 @@ internal smallJsont* insertJsonNSmashSmallJson(smallJsont *self, intmax_t index,
smallJsont *r = NULL;
r = insertJsonSmallJson(self, index, toInsert);
- if (toInsert) {
- if (r) {
- smashO(toInsert);
- }
- else {
- terminateO(toInsert);
+ if (r) {
+ smashO(toInsert);
}
- }
return(r);
}
@@ -7698,11 +10109,18 @@ internal smallJsont* insertStringSmallJson(smallJsont *self, intmax_t index, sma
char *r = NULL;
// sanity checks
- if (self->topIsA != TOP_IS_STRING || !self->topS) {
+ if (self->topIsA != TOP_IS_STRING || !toInsert) {
return(NULL);
}
- if (!toInsert || !toInsert->data || !toInsert->_len) {
- return(NULL);
+ if (!self->topS) {
+ if (index) {
+ return(NULL);
+ }
+ if (toInsert->data) {
+ self->topS = (sStringt*)sDuplicateTiny((smallt*)toInsert->data);
+ }
+ // TODO self->_len = toInsert->_len
+ return(self);
}
if (!lenSmallJson(self) && index == -1) {
@@ -7727,6 +10145,9 @@ internal smallJsont* insertStringSmallJson(smallJsont *self, intmax_t index, sma
index = lenSmallJson(self) + index;
}
+ if (!toInsert->data || !toInsert->_len) {
+ return(self);
+ }
if (index == 0) {
// insert at beginning
@@ -7750,11 +10171,17 @@ internal smallJsont* insertSSmallJson(smallJsont *self, intmax_t index, const ch
char *r = NULL;
// sanity checks
- if (self->topIsA != TOP_IS_STRING || !self->topS) {
+ if (self->topIsA != TOP_IS_STRING || !toInsert) {
return(NULL);
}
- if (!toInsert || !*toInsert) {
- return(NULL);
+ if (!self->topS) {
+ if (index) {
+ return(NULL);
+ }
+ char header[2] = {STRING ,0};
+ self->topS = (sStringt*) catS(header, toInsert);
+ // TODO self->_len = strlen(toInsert)
+ return(self);
}
if (!lenSmallJson(self) && index == -1) {
@@ -7779,6 +10206,9 @@ internal smallJsont* insertSSmallJson(smallJsont *self, intmax_t index, const ch
index = lenSmallJson(self) + index;
}
+ if (!*toInsert) {
+ return(self);
+ }
if (index == 0) {
// insert at beginning
@@ -7802,21 +10232,25 @@ internal smallJsont* insertSSmallJson(smallJsont *self, intmax_t index, const ch
internal smallJsont* insertNFreeStringSmallJson(smallJsont *self, intmax_t index, smallStringt *toInsert) {
smallJsont *r = insertStringSmallJson(self, index, toInsert);
- terminateO(toInsert);
+ if (r) {
+ terminateO(toInsert);
+ }
return(r);
}
internal smallJsont* insertSNFreeSmallJson(smallJsont *self, intmax_t index, char *toInsert) {
smallJsont *r = insertSSmallJson(self, index, toInsert);
- free(toInsert);
+ if (r) {
+ free(toInsert);
+ }
return(r);
}
internal smallJsont* injectSmallJson(smallJsont *self, intmax_t index, baset *toInject) {
size_t len;
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (self->topIsA != TOP_IS_ARRAY || !toInject) {
return(NULL);
}
@@ -7847,13 +10281,7 @@ internal smallJsont* injectSmallJson(smallJsont *self, intmax_t index, baset *to
sArrayt *a = allocSArray();
- smallt *o = NULL;
- if (toInject) {
- o = toSmallt(toInject);
- }
- else {
- o = (smallt *) allocSUndefined();
- }
+ smallt *o = toSmallt(toInject);
if (index == 0) {
// inject at beginning
@@ -8140,6 +10568,10 @@ internal smallJsont* injectIntSmallJson(smallJsont *self, intmax_t index, int64_
internal smallJsont* injectSSmallJson(smallJsont *self, intmax_t index, const char *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
if (self->topIsA == TOP_IS_STRING) {
return(insertSSmallJson(self, index, toInject));
}
@@ -8175,13 +10607,7 @@ internal smallJsont* injectSSmallJson(smallJsont *self, intmax_t index, const ch
sArrayt *a = allocSArray();
- smallt *o;
- if (toInject) {
- o = (smallt *) allocSStringTiny(toInject);
- }
- else {
- o = (smallt *) allocSStringTiny("");
- }
+ smallt *o = (smallt *) allocSStringTiny(toInject);
if (index == 0) {
// inject at beginning
@@ -8219,7 +10645,11 @@ internal smallJsont* injectCharSmallJson(smallJsont *self, intmax_t index, char
internal smallJsont* injectDictSmallJson(smallJsont *self, intmax_t index, smallDictt *toInject) {
size_t len;
- if (self->topIsA != TOP_IS_ARRAY) {
+ if (!toInject) {
+ return(NULL);
+ }
+
+ if (self->topIsA != TOP_IS_ARRAY || !toInject) {
return(NULL);
}
@@ -8254,13 +10684,7 @@ internal smallJsont* injectDictSmallJson(smallJsont *self, intmax_t index, small
sArrayt *a = allocSArray();;
- smallt *o = NULL;
- if (toInject) {
- o = (smallt *) toInject->d;
- }
- else {
- o = (smallt *) allocSDict();
- }
+ smallt *o = (smallt *) toInject->d;
if (index == 0) {
// inject at beginning
@@ -8292,6 +10716,10 @@ internal smallJsont* injectDictSmallJson(smallJsont *self, intmax_t index, small
internal smallJsont* injectArraySmallJson(smallJsont *self, intmax_t index, smallArrayt *toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -8327,13 +10755,7 @@ internal smallJsont* injectArraySmallJson(smallJsont *self, intmax_t index, smal
sArrayt *a = allocSArray();;
- smallt *o = NULL;
- if (toInject) {
- o = (smallt *) toInject->a;
- }
- else {
- o = (smallt *) allocSArray();
- }
+ smallt *o = (smallt *) toInject->a;
if (index == 0) {
// inject at beginning
@@ -8365,6 +10787,10 @@ internal smallJsont* injectArraySmallJson(smallJsont *self, intmax_t index, smal
internal smallJsont* injectArraycSmallJson(smallJsont *self, intmax_t index, char **toInject) {
size_t len;
+ if (!toInject) {
+ return(NULL);
+ }
+
if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
@@ -8397,18 +10823,13 @@ internal smallJsont* injectArraycSmallJson(smallJsont *self, intmax_t index, cha
sArrayt *a = allocSArray();;
smallt *o = NULL;
- if (toInject) {
- sArrayt *aa = allocSArray();
+ sArrayt *aa = allocSArray();
- forEachCharP(toInject, e) {
- sStringt *s = allocSStringTiny(*e);
- sArrayPushTiny(&aa, (smallt *) s);
- }
- o = (smallt *) aa;
- }
- else {
- o = (smallt *) allocSArray();
+ forEachCharP(toInject, e) {
+ sStringt *s = allocSStringTiny(*e);
+ sArrayPushTiny(&aa, (smallt *) s);
}
+ o = (smallt *) aa;
if (index == 0) {
// inject at beginning
@@ -8439,6 +10860,10 @@ internal smallJsont* injectArraycSmallJson(smallJsont *self, intmax_t index, cha
internal smallJsont* injectSmallBoolSmallJson(smallJsont *self, intmax_t index, smallBoolt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallBool(toInject)) {
return(NULL);
}
@@ -8448,6 +10873,10 @@ internal smallJsont* injectSmallBoolSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* injectSmallBytesSmallJson(smallJsont *self, intmax_t index, smallBytest *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallBytes(toInject)) {
return(NULL);
}
@@ -8457,6 +10886,10 @@ internal smallJsont* injectSmallBytesSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* injectSmallDoubleSmallJson(smallJsont *self, intmax_t index, smallDoublet *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallDouble(toInject)) {
return(NULL);
}
@@ -8466,6 +10899,10 @@ internal smallJsont* injectSmallDoubleSmallJson(smallJsont *self, intmax_t index
internal smallJsont* injectSmallIntSmallJson(smallJsont *self, intmax_t index, smallIntt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallInt(toInject)) {
return(NULL);
}
@@ -8475,6 +10912,10 @@ internal smallJsont* injectSmallIntSmallJson(smallJsont *self, intmax_t index, s
internal smallJsont* injectSmallJsonSmallJson(smallJsont *self, intmax_t index, smallJsont *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallJson(toInject)) {
return(NULL);
}
@@ -8491,6 +10932,10 @@ internal smallJsont* injectSmallJsonSmallJson(smallJsont *self, intmax_t index,
internal smallJsont* injectSmallStringSmallJson(smallJsont *self, intmax_t index, smallStringt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallString(toInject)) {
return(NULL);
}
@@ -8508,6 +10953,10 @@ internal smallJsont* injectSmallStringSmallJson(smallJsont *self, intmax_t index
internal smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
if (checkObjectTypes && toInject && !isOSmallContainer(toInject)) {
return(NULL);
}
@@ -8516,138 +10965,221 @@ internal smallJsont* injectSmallContainerSmallJson(smallJsont *self, intmax_t in
}
internal smallJsont* injectNFreeSmallJson(smallJsont *self, intmax_t index, baset *toInject) {
+ size_t len;
+
+ if (self->topIsA != TOP_IS_ARRAY || !toInject) {
+ return(NULL);
+ }
+
+ len = lenSmallJson(self);
+
+ if (!len && index == -1) {
+ // empty string, index -1 is equal to 0
+ index = 0;
+ }
+ bool neg = false;
+ if (index < 0) {
+ neg = true;
+ }
+
+ if (index > (intmax_t)len) {
+ return(NULL);
+ }
+ if (neg) {
+ index++;
+ }
+ if (index < -(intmax_t)len) {
+ return(NULL);
+ }
+ if (neg) {
+ index = len + index;
+ }
+
+
+ sArrayt *a = allocSArray();
+
+ smallt *o = toSmallt(toInject);
+
+ if (!(o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET))) {
+ finishO(toInject);
+ }
+
+ if (index == 0) {
+ // inject at beginning
+ sArrayPushTiny(&a, o);
+ for (intmax_t i=0;i < (intmax_t)len;i++) {
+ o = sArrayGetTiny(self->topA, i);
+ sArrayPushTiny(&a, o);
+ }
+ }
+ else {
+
+ smallt *o2;
+ for (intmax_t i=0;i < index;i++) {
+ o2 = sArrayGetTiny(self->topA, i);
+ sArrayPushTiny(&a, o2);
+ }
+ sArrayPushTiny(&a, o);
+ for (intmax_t i=index;i < (intmax_t)len;i++) {
+ o = sArrayGetTiny(self->topA, i);
+ sArrayPushTiny(&a, o);
+ }
+ }
- injectSmallJson(self, index, toInject);
- finishO(toInject);
+ free(self->topA);
+ self->topA = a;
return(self);
}
internal smallJsont* injectNFreeUndefinedSmallJson(smallJsont *self, intmax_t index, undefinedt *undefined) {
- injectUndefinedSmallJson(self, index);
- terminateO(undefined);
- return(self);
+ smallJsont *r = injectUndefinedSmallJson(self, index);;
+ if (r) {
+ terminateO(undefined);
+ }
+ return(r);
}
internal smallJsont* injectNFreeSSmallJson(smallJsont *self, intmax_t index, char *toInject) {
- injectSSmallJson(self, index, toInject);
- free(toInject);
- return(self);
+ if (!toInject) {
+ return(NULL);
+ }
+
+ smallJsont *r = injectSSmallJson(self, index, toInject);;
+ if (r) {
+ free(toInject);
+ }
+ return(r);
}
internal smallJsont* injectNFreeDictSmallJson(smallJsont *self, intmax_t index, smallDictt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectDictSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeArraySmallJson(smallJsont *self, intmax_t index, smallArrayt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectArraySmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeArraycSmallJson(smallJsont *self, intmax_t index, char **toInject) {
- injectArraycSmallJson(self, index, toInject);
- listFreeS(toInject);
+ if (!toInject) {
+ return(NULL);
+ }
+
+ smallJsont *r = injectArraycSmallJson(self, index, toInject);;
+ if (r) {
+ listFreeS(toInject);
+ }
return(self);
}
internal smallJsont* injectNFreeSmallBoolSmallJson(smallJsont *self, intmax_t index, smallBoolt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallBoolSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallBytesSmallJson(smallJsont *self, intmax_t index, smallBytest *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallBytesSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallDoubleSmallJson(smallJsont *self, intmax_t index, smallDoublet *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallDoubleSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallIntSmallJson(smallJsont *self, intmax_t index, smallIntt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallIntSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallJsonSmallJson(smallJsont *self, intmax_t index, smallJsont *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallJsonSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallStringSmallJson(smallJsont *self, intmax_t index, smallStringt *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallStringSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
internal smallJsont* injectNFreeSmallContainerSmallJson(smallJsont *self, intmax_t index, smallContainert *toInject) {
+ if (!toInject) {
+ return(NULL);
+ }
+
smallJsont *r = injectSmallContainerSmallJson(self, index, toInject);
if (r) {
finishO(toInject);
}
- else {
- terminateO(toInject);
- }
return(r);
}
@@ -8868,8 +11400,12 @@ internal int sortFCmp(void *func, const void *a, const void *b) {
cmp = (shCmpt) func;
int r = cmp(aO, bO);
- finishO(aO);
- finishO(bO);
+ if ((A->type != CONTAINER) || (A->type == CONTAINER && ((sContainert*)A)->dataType != SH_DT_BASET)) {
+ finishO(aO);
+ }
+ if ((A->type != CONTAINER) || (A->type == CONTAINER && ((sContainert*)A)->dataType != SH_DT_BASET)) {
+ finishO(bO);
+ }
return(r);
}
#else
@@ -8885,8 +11421,12 @@ internal int sortFCmp(const void *a, const void *b, void *func) {
cmp = (shCmpt) func;
int r = cmp(aO, bO);
- finishO(aO);
- finishO(bO);
+ if ((A->type != CONTAINER) || (A->type == CONTAINER && ((sContainert*)A)->dataType != SH_DT_BASET)) {
+ finishO(aO);
+ }
+ if ((A->type != CONTAINER) || (A->type == CONTAINER && ((sContainert*)A)->dataType != SH_DT_BASET)) {
+ finishO(bO);
+ }
return(r);
}
#endif
@@ -14068,27 +16608,42 @@ internal void enumerateSmallJsonF(smallJsont *self, void *closure, enumerateElem
return;
}
- enumerateSmallJson(self, e, i) {
- if (!funcElem(closure, i, e)) {
- finishO(e);
+ enumerateSArray(self->topA, e, i) {
+ baset *E = toBaset(e);
+ if (!funcElem(closure, i, E)) {
+ if (e->type == CONTAINER && ((sContainert*)e)->dataType == SH_DT_BASET) {
+ break;
+ }
+ finishO(E);
break;
}
- finishO(e);
+ if (e->type == CONTAINER && ((sContainert*)e)->dataType == SH_DT_BASET) {
+ continue;
+ }
+ finishO(E);
}
return;
}
internal void enumerateDictSmallJson(smallJsont *self, void *closure, enumerateDictElementSmallJsonFt funcElem) {
- forEachDictSmallJson(self, key, e) {
- if (!funcElem(closure, key, e)) {
- finishO(e);
- break;
- }
- finishO(e);
- }
- listFreeS(libsheepyInternalKeys);
+ forEachSDict(self->top, e) {
+ if (e->key) {
+ baset *E = toBaset(e->data);
+ if (!funcElem(closure, e->key, E)) {
+ if (e->data->type == CONTAINER && ((sContainert*)e->data)->dataType == SH_DT_BASET) {
+ break;
+ }
+ finishO(E);
+ break;
+ }
+ if (e->data->type == CONTAINER && ((sContainert*)e->data)->dataType == SH_DT_BASET) {
+ continue;
+ }
+ finishO(E);
}
+ }
+ }
internal smallStringt* joinSmallJson(smallJsont *self, const char* delim) {
smallStringt *r = NULL;
@@ -15509,6 +18064,7 @@ smallJsont* zipArrayJsonSmallJson(smallJsont *self, char** array1, smallJsont *a
internal baset* iterStartSmallJson(smallJsont *self) {
+ smallt *o = NULL;
if (isEmptySmallJson(self)) {
// no iteration on empty arrays
@@ -15524,22 +18080,37 @@ internal baset* iterStartSmallJson(smallJsont *self) {
self->iterIndex = i;
break;
}
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
self->iterKey = (&((self->top)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->top)->elements) + self->iterIndex)->data);
+ o = (&((self->top)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
break;
case TOP_IS_ARRAY:
// get first element
self->iterIndex = 0;
self->iterStep = 1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = toBaset(sArrayGetTiny(self->topA, 0));
+ // TODO find first non NULL element, deleted element can be at index 0
+ o = sArrayGetTiny(self->topA, 0);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
break;
}
return(self->iterElement);
@@ -15563,12 +18134,19 @@ internal const char* iterStartKeySmallJson(smallJsont *self) {
self->iterIndex = i;
break;
}
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
self->iterKey = (&((self->top)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->top)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->top)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterKey);
}
@@ -15588,11 +18166,18 @@ internal baset* iterStartLastSmallJson(smallJsont *self) {
// get first element
self->iterIndex = (ssize_t)lenSmallJson(self) - 1;
self->iterStep = -1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = toBaset(sArrayGetTiny(self->topA, self->iterIndex));
+ smallt *o = sArrayGetTiny(self->topA, self->iterIndex);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -15621,11 +18206,18 @@ internal baset* iterStartFromSmallJson(smallJsont *self, intmax_t index) {
// get first element
self->iterIndex = index;
self->iterStep = 1;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = toBaset(sArrayGetTiny(self->topA, 0));
+ smallt *o = sArrayGetTiny(self->topA, 0);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -15659,11 +18251,18 @@ internal baset* iterStartFromStepSmallJson(smallJsont *self, intmax_t index, int
// get first element
self->iterIndex = index;
self->iterStep = step;
- if (self->iterElement) {
+ if (self->iterElementDataType != SH_DT_BASET) {
// free already created base object
finishO(self->iterElement);
}
- self->iterElement = toBaset(sArrayGetTiny(self->topA, self->iterIndex));
+ smallt *o = sArrayGetTiny(self->topA, self->iterIndex);
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterElement);
}
@@ -15679,7 +18278,9 @@ internal baset* iterNextSmallJson(smallJsont *self) {
// get next element
self->iterIndex++;
// free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
rangeFrom(i, self->iterIndex, self->top->count) {
if (&((self->top)->elements) + i) {
self->iterIndex = i;
@@ -15696,11 +18297,20 @@ internal baset* iterNextSmallJson(smallJsont *self) {
return(NULL);
}
self->iterKey = (&((self->top)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->top)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->top)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
break;
case TOP_IS_ARRAY:
// free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
// get next element until we get a valid item or the end is reached
while (!self->iterElement) {
// get next element
@@ -15710,7 +18320,17 @@ internal baset* iterNextSmallJson(smallJsont *self) {
self->iterIndex = -1;
return(NULL);
}
- self->iterElement = toBaset(sArrayGetTiny(self->topA, self->iterIndex));
+ smallt *o = sArrayGetTiny(self->topA, self->iterIndex);
+ if (!o) {
+ continue;
+ }
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
}
break;
}
@@ -15730,7 +18350,9 @@ internal const char* iterNextKeySmallJson(smallJsont *self) {
// get next element
self->iterIndex++;
// free already created base object
- finishO(self->iterElement);
+ if (self->iterElementDataType != SH_DT_BASET) {
+ finishO(self->iterElement);
+ }
rangeFrom(i, self->iterIndex, self->top->count) {
if (&((self->top)->elements) + i) {
self->iterIndex = i;
@@ -15747,7 +18369,14 @@ internal const char* iterNextKeySmallJson(smallJsont *self) {
return(NULL);
}
self->iterKey = (&((self->top)->elements) + self->iterIndex)->key;
- self->iterElement = toBaset((&((self->top)->elements) + self->iterIndex)->data);
+ smallt *o = (&((self->top)->elements) + self->iterIndex)->data;
+ if ((o->type == CONTAINER) && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ self->iterElementDataType = SH_DT_BASET;
+ }
+ else {
+ self->iterElementDataType = SH_DT_UNKNOWN;
+ }
+ self->iterElement = toBaset(o);
return(self->iterKey);
}
@@ -15787,17 +18416,26 @@ internal baset* getSmallJson(smallJsont *self, const char *key) {
smallt *o = NULL;
getJsonPath;
+ pass:
return(toBaset(o));
+ fail:
+ return(NULL);
}
internal undefinedt* getUndefinedSmallJson(smallJsont *self, const char *key) {
- undefinedt *e = (undefinedt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
+ fail:
+ return(NULL);
}
internal bool getBoolSmallJson(smallJsont *self, const char *key) {
@@ -15806,10 +18444,6 @@ internal bool getBoolSmallJson(smallJsont *self, const char *key) {
e = getSmallBoolSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(false);
- }
r = e->f->get(e);
finishO(e);
}
@@ -15822,10 +18456,6 @@ internal bool* getBoolPSmallJson(smallJsont *self, const char *key) {
e = getSmallBoolSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -15838,10 +18468,6 @@ internal double getDoubleSmallJson(smallJsont *self, const char *key) {
e = getSmallDoubleSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -15854,10 +18480,6 @@ internal double* getDoublePSmallJson(smallJsont *self, const char *key) {
e = getSmallDoubleSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -15870,10 +18492,6 @@ internal int64_t getIntSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -15886,10 +18504,6 @@ internal int64_t* getIntPSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -15902,10 +18516,6 @@ internal int32_t getInt32SmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
finishO(e);
}
@@ -15918,10 +18528,6 @@ internal int32_t* getInt32PSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (int32_t *)e->f->getP(e);
finishO(e);
}
@@ -15934,10 +18540,6 @@ internal uint64_t getUintSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
finishO(e);
}
@@ -15950,10 +18552,6 @@ internal uint64_t* getUintPSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint64_t *)e->f->getP(e);
finishO(e);
}
@@ -15966,10 +18564,6 @@ internal uint32_t getUint32SmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
finishO(e);
}
@@ -15982,10 +18576,6 @@ internal uint32_t* getUint32PSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint32_t *)e->f->getP(e);
finishO(e);
}
@@ -15998,10 +18588,6 @@ internal char* getSSmallJson(smallJsont *self, const char *key) {
e = getSmallStringSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16010,67 +18596,113 @@ internal char* getSSmallJson(smallJsont *self, const char *key) {
internal smallDictt* getDictSmallJson(smallJsont *self, const char *key) {
- smallDictt *e = (smallDictt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+ return((smallDictt*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallArrayt* getArraySmallJson(smallJsont *self, const char *key) {
- smallArrayt *e = (smallArrayt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+ return((smallArrayt*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallBoolt* getSmallBoolSmallJson(smallJsont *self, const char *key) {
- smallBoolt *e = (smallBoolt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BOOL) {
return(NULL);
}
- return(e);
+ return((smallBoolt*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallBytest* getSmallBytesSmallJson(smallJsont *self, const char *key) {
- smallBytest *e = (smallBytest*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallDoublet* getSmallDoubleSmallJson(smallJsont *self, const char *key) {
- smallDoublet *e = (smallDoublet*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallIntt* getSmallIntSmallJson(smallJsont *self, const char *key) {
- smallIntt *e = (smallIntt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != INT) {
return(NULL);
}
- return(e);
+ return((smallIntt*) toBaset(o));
+ fail:
+ return(NULL);
}
internal smallJsont* getSmallJsonSmallJson(smallJsont *self, const char *key) {
- baset *e = getSmallJson(self, key);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ baset *e = toBaset(o);
if (!e) {
return(NULL);
@@ -16079,60 +18711,96 @@ internal smallJsont* getSmallJsonSmallJson(smallJsont *self, const char *key) {
createAllocateSmallJson(r);
setTopNFreeSmallJson(r, e);
return(r);
+ fail:
+ return(NULL);
}
internal smallStringt* getSmallStringSmallJson(smallJsont *self, const char *key) {
- smallStringt *e = (smallStringt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*) toBaset(o));
+ fail:
+ return(NULL);
}
internal void* getVoidSmallJson(smallJsont *self, const char *key) {
- smallContainert *e = NULL;
- void* r = NULL;
+ smallt *o = NULL;
- e = getSmallContainerSmallJson(self, key);
- if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- finishO(e);
- return(NULL);
- }
- r = e->f->get(e);
- finishO(e);
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
}
- return(r);
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ return(((sContainert*)o)->data);
+ fail:
+ return(NULL);
}
internal smallContainert* getSmallContainerSmallJson(smallJsont *self, const char *key) {
- smallContainert *e = (smallContainert*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ return((smallContainert*) toBaset(o));
+ fail:
+ return(NULL);
}
//getNDup
internal baset* getNDupSmallJson(smallJsont *self, const char *key) {
smallt *o = NULL;
- getNDupJsonPath;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ baset *b = ((sContainert*)o)->data;
+ return(duplicateO(b));
+ }
return(toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal undefinedt* getNDupUndefinedSmallJson(smallJsont *self, const char *key) {
- undefinedt *e = (undefinedt*)getSmallJson(self, key);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
return(NULL);
}
- return(e);
+ return(allocUndefined());
+ fail:
+ return(NULL);
}
internal bool getNDupBoolSmallJson(smallJsont *self, const char *key) {
@@ -16141,10 +18809,6 @@ internal bool getNDupBoolSmallJson(smallJsont *self, const char *key) {
e = getSmallBoolSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(false);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16157,10 +18821,6 @@ internal double getNDupDoubleSmallJson(smallJsont *self, const char *key) {
e = getSmallDoubleSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16173,10 +18833,6 @@ internal int64_t getNDupIntSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16189,10 +18845,6 @@ internal int32_t getNDupInt32SmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
finishO(e);
}
@@ -16205,10 +18857,6 @@ internal uint64_t getNDupUintSmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
finishO(e);
}
@@ -16221,10 +18869,6 @@ internal uint32_t getNDupUint32SmallJson(smallJsont *self, const char *key) {
e = getSmallIntSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
finishO(e);
}
@@ -16237,10 +18881,6 @@ internal char* getNDupSSmallJson(smallJsont *self, const char *key) {
e = getSmallStringSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->toString(e);
finishO(e);
}
@@ -16249,67 +18889,113 @@ internal char* getNDupSSmallJson(smallJsont *self, const char *key) {
internal smallDictt* getNDupDictSmallJson(smallJsont *self, const char *key) {
- smallDictt *e = (smallDictt*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
return(NULL);
}
- return(e);
+ return((smallDictt*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallArrayt* getNDupArraySmallJson(smallJsont *self, const char *key) {
- smallArrayt *e = (smallArrayt*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != ARRAY) {
return(NULL);
}
- return(e);
+ return((smallArrayt*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallBoolt* getNDupSmallBoolSmallJson(smallJsont *self, const char *key) {
- smallBoolt *e = (smallBoolt*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != BOOL) {
+ return(NULL);
+ }
+ return((smallBoolt*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallBytest* getNDupSmallBytesSmallJson(smallJsont *self, const char *key) {
- smallBytest *e = (smallBytest*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BYTES) {
return(NULL);
}
- return(e);
+ return((smallBytest*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallDoublet* getNDupSmallDoubleSmallJson(smallJsont *self, const char *key) {
- smallDoublet *e = (smallDoublet*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallIntt* getNDupSmallIntSmallJson(smallJsont *self, const char *key) {
- smallIntt *e = (smallIntt*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != INT) {
return(NULL);
}
- return(e);
+ return((smallIntt*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal smallJsont* getNDupSmallJsonSmallJson(smallJsont *self, const char *key) {
- baset *e = getNDupSmallJson(self, key);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+
+ baset *e = toBaset(sDuplicate(o));
if (!e) {
return(NULL);
@@ -16318,16 +19004,24 @@ internal smallJsont* getNDupSmallJsonSmallJson(smallJsont *self, const char *key
createAllocateSmallJson(r);
setTopNFreeSmallJson(r, e);
return(r);
+ fail:
+ return(NULL);
}
internal smallStringt* getNDupSmallStringSmallJson(smallJsont *self, const char *key) {
- smallStringt *e = (smallStringt*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*) toBaset(sDuplicate(o)));
+ fail:
+ return(NULL);
}
internal void* getNDupVoidSmallJson(smallJsont *self, const char *key) {
@@ -16336,10 +19030,6 @@ internal void* getNDupVoidSmallJson(smallJsont *self, const char *key) {
e = getNDupSmallContainerSmallJson(self, key);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16348,12 +19038,24 @@ internal void* getNDupVoidSmallJson(smallJsont *self, const char *key) {
internal smallContainert* getNDupSmallContainerSmallJson(smallJsont *self, const char *key) {
- smallContainert *e = (smallContainert*)getNDupSmallJson(self, key);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- finishO(e);
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
return(NULL);
}
- return(e);
+ smallContainert *e = (smallContainert*) toBaset(o);
+ smallContainert *r = duplicateO(e);
+ finishO(e);
+ return(r);
+ fail:
+ return(NULL);
}
baset* getAtSmallJson(smallJsont *self, intmax_t index) {
@@ -16372,18 +19074,39 @@ baset* getAtSmallJson(smallJsont *self, intmax_t index) {
index = lenSmallJson(self) + index;
}
- baset *r = toBaset(sArrayGetTiny(self->topA, index));
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+
+ baset *r = toBaset(o);
return(r);
}
internal undefinedt* getAtUndefinedSmallJson(smallJsont *self, intmax_t index) {
- undefinedt *e = (undefinedt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != UNDEFINED) {
return(NULL);
}
- return(e);
+ return(allocUndefined());
}
internal bool getAtBoolSmallJson(smallJsont *self, intmax_t index) {
@@ -16392,10 +19115,6 @@ internal bool getAtBoolSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallBoolSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(false);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16408,10 +19127,6 @@ internal bool* getAtBoolPSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallBoolSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -16424,10 +19139,6 @@ internal double getAtDoubleSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallDoubleSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16440,10 +19151,6 @@ internal double* getAtDoublePSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallDoubleSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -16456,10 +19163,6 @@ internal int64_t getAtIntSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16472,10 +19175,6 @@ internal int64_t* getAtIntPSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->getP(e);
finishO(e);
}
@@ -16488,10 +19187,6 @@ internal int32_t getAtInt32SmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
finishO(e);
}
@@ -16504,10 +19199,6 @@ internal int32_t* getAtInt32PSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (int32_t *)e->f->getP(e);
finishO(e);
}
@@ -16520,10 +19211,6 @@ internal uint64_t getAtUintSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
finishO(e);
}
@@ -16536,10 +19223,6 @@ internal uint64_t* getAtUintPSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint64_t *)e->f->getP(e);
finishO(e);
}
@@ -16552,10 +19235,6 @@ internal uint32_t getAtUint32SmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
finishO(e);
}
@@ -16568,10 +19247,6 @@ internal uint32_t* getAtUint32PSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- finishO(e);
- return(NULL);
- }
r = (uint32_t *)e->f->getP(e);
finishO(e);
}
@@ -16584,10 +19259,6 @@ internal char* getAtSSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallStringSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- finishO(e);
- return(0);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16596,67 +19267,187 @@ internal char* getAtSSmallJson(smallJsont *self, intmax_t index) {
internal smallDictt* getAtDictSmallJson(smallJsont *self, intmax_t index) {
- smallDictt *e = (smallDictt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ return((smallDictt*) toBaset(o));
+}
+
+internal smallArrayt* getAtArraySmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+ return((smallArrayt*) toBaset(o));
+}
+
+internal smallBoolt* getAtSmallBoolSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BOOL) {
+ return(NULL);
+ }
+ return((smallBoolt*) toBaset(o));
+}
+
+internal smallBytest* getAtSmallBytesSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*) toBaset(o));
}
-internal smallArrayt* getAtArraySmallJson(smallJsont *self, intmax_t index) {
+internal smallDoublet* getAtSmallDoubleSmallJson(smallJsont *self, intmax_t index) {
- smallArrayt *e = (smallArrayt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal smallBoolt* getAtSmallBoolSmallJson(smallJsont *self, intmax_t index) {
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
- smallBoolt *e = (smallBoolt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- finishO(e);
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DOUBLE) {
return(NULL);
}
- return(e);
+ return((smallDoublet*) toBaset(o));
}
-internal smallBytest* getAtSmallBytesSmallJson(smallJsont *self, intmax_t index) {
+internal smallIntt* getAtSmallIntSmallJson(smallJsont *self, intmax_t index) {
- smallBytest *e = (smallBytest*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal smallDoublet* getAtSmallDoubleSmallJson(smallJsont *self, intmax_t index) {
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
- smallDoublet *e = (smallDoublet*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- finishO(e);
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != INT) {
return(NULL);
}
- return(e);
+ return((smallIntt*) toBaset(o));
}
-internal smallIntt* getAtSmallIntSmallJson(smallJsont *self, intmax_t index) {
+internal smallJsont* getAtSmallJsonSmallJson(smallJsont *self, intmax_t index) {
- smallIntt *e = (smallIntt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal smallJsont* getAtSmallJsonSmallJson(smallJsont *self, intmax_t index) {
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
- baset *e = getAtSmallJson(self, index);
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
+ baset *e = toBaset(o);
createAllocateSmallJson(r);
setTopNFreeSmallJson(r, e);
@@ -16665,12 +19456,28 @@ internal smallJsont* getAtSmallJsonSmallJson(smallJsont *self, intmax_t index) {
internal smallStringt* getAtSmallStringSmallJson(smallJsont *self, intmax_t index) {
- smallStringt *e = (smallStringt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*) toBaset(o));
}
internal void* getAtVoidSmallJson(smallJsont *self, intmax_t index) {
@@ -16679,10 +19486,6 @@ internal void* getAtVoidSmallJson(smallJsont *self, intmax_t index) {
e = getAtSmallContainerSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- finishO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16691,12 +19494,34 @@ internal void* getAtVoidSmallJson(smallJsont *self, intmax_t index) {
internal smallContainert* getAtSmallContainerSmallJson(smallJsont *self, intmax_t index) {
- smallContainert *e = (smallContainert*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- finishO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);;
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ return((smallContainert*) toBaset(o));
}
baset* getAtNDupSmallJson(smallJsont *self, intmax_t index) {
@@ -16715,18 +19540,41 @@ baset* getAtNDupSmallJson(smallJsont *self, intmax_t index) {
index = lenSmallJson(self) + index;
}
- baset *r = toBaset(sDuplicate(sArrayGetTiny(self->topA, index)));
- return(r);
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type == CONTAINER && (((sContainert*)o)->dataType == SH_DT_BASET)) {
+ baset *b = ((sContainert*)o)->data;
+ return(duplicateO(b));
+ }
+ return(toBaset(sDuplicate(o)));
}
internal undefinedt* getAtNDupUndefinedSmallJson(smallJsont *self, intmax_t index) {
- undefinedt *e = (undefinedt*)getAtSmallJson(self, index);
- if (checkObjectTypes && e && !isOUndefined(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != UNDEFINED) {
+ return(NULL);
+ }
+ return(allocUndefined());
}
internal bool getAtNDupBoolSmallJson(smallJsont *self, intmax_t index) {
@@ -16735,10 +19583,6 @@ internal bool getAtNDupBoolSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallBoolSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallBool(e)) {
- terminateO(e);
- return(false);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -16751,10 +19595,6 @@ internal double getAtNDupDoubleSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallDoubleSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallDouble(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -16767,10 +19607,6 @@ internal int64_t getAtNDupIntSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->get(e);
terminateO(e);
}
@@ -16783,10 +19619,6 @@ internal int32_t getAtNDupInt32SmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (int32_t)e->f->get(e);
terminateO(e);
}
@@ -16799,10 +19631,6 @@ internal uint64_t getAtNDupUintSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint64_t)e->f->get(e);
terminateO(e);
}
@@ -16815,10 +19643,6 @@ internal uint32_t getAtNDupUint32SmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallIntSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallInt(e)) {
- terminateO(e);
- return(0);
- }
r = (uint32_t)e->f->get(e);
terminateO(e);
}
@@ -16831,10 +19655,6 @@ internal char* getAtNDupSSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallStringSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallString(e)) {
- terminateO(e);
- return(0);
- }
r = e->f->toString(e);
terminateO(e);
}
@@ -16843,67 +19663,185 @@ internal char* getAtNDupSSmallJson(smallJsont *self, intmax_t index) {
internal smallDictt* getAtNDupDictSmallJson(smallJsont *self, intmax_t index) {
- smallDictt *e = (smallDictt*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallDict(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != DICT) {
+ return(NULL);
+ }
+ return((smallDictt*)toBaset(sDuplicate(o)));
+}
+
+internal smallArrayt* getAtNDupArraySmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != ARRAY) {
+ return(NULL);
+ }
+ return((smallArrayt*)toBaset(sDuplicate(o)));
+}
+
+internal smallBoolt* getAtNDupSmallBoolSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BOOL) {
+ return(NULL);
+ }
+ return((smallBoolt*)toBaset(sDuplicate(o)));
+}
+
+internal smallBytest* getAtNDupSmallBytesSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != BYTES) {
+ return(NULL);
+ }
+ return((smallBytest*)toBaset(sDuplicate(o)));
+}
+
+internal smallDoublet* getAtNDupSmallDoubleSmallJson(smallJsont *self, intmax_t index) {
+
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
return(NULL);
}
- return(e);
-}
-
-internal smallArrayt* getAtNDupArraySmallJson(smallJsont *self, intmax_t index) {
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
- smallArrayt *e = (smallArrayt*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallArray(e)) {
- terminateO(e);
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != DOUBLE) {
+ return(NULL);
+ }
+ return((smallDoublet*)toBaset(sDuplicate(o)));
}
-internal smallBoolt* getAtNDupSmallBoolSmallJson(smallJsont *self, intmax_t index) {
+internal smallIntt* getAtNDupSmallIntSmallJson(smallJsont *self, intmax_t index) {
- smallBoolt *e = (smallBoolt*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallBool(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-internal smallBytest* getAtNDupSmallBytesSmallJson(smallJsont *self, intmax_t index) {
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
- smallBytest *e = (smallBytest*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallBytes(e)) {
- terminateO(e);
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != INT) {
return(NULL);
}
- return(e);
+ return((smallIntt*)toBaset(sDuplicate(o)));
}
-internal smallDoublet* getAtNDupSmallDoubleSmallJson(smallJsont *self, intmax_t index) {
+internal smallJsont* getAtNDupSmallJsonSmallJson(smallJsont *self, intmax_t index) {
- smallDoublet *e = (smallDoublet*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallDouble(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
return(NULL);
}
- return(e);
-}
-
-internal smallIntt* getAtNDupSmallIntSmallJson(smallJsont *self, intmax_t index) {
- smallIntt *e = (smallIntt*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallInt(e)) {
- terminateO(e);
+ if (index >= (intmax_t)lenSmallJson(self)) {
return(NULL);
}
- return(e);
-}
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
-internal smallJsont* getAtNDupSmallJsonSmallJson(smallJsont *self, intmax_t index) {
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if ((o->type == BYTES) || (o->type == CONTAINER)) {
+ return(NULL);
+ }
- baset *e = getAtNDupSmallJson(self, index);
+ baset *e = toBaset(sDuplicate(o));
createAllocateSmallJson(r);
setTopNFreeSmallJson(r, e);
@@ -16912,12 +19850,28 @@ internal smallJsont* getAtNDupSmallJsonSmallJson(smallJsont *self, intmax_t inde
internal smallStringt* getAtNDupSmallStringSmallJson(smallJsont *self, intmax_t index) {
- smallStringt *e = (smallStringt*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallString(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
+ return(NULL);
+ }
+ if (o->type != STRING) {
return(NULL);
}
- return(e);
+ return((smallStringt*)toBaset(sDuplicate(o)));
}
internal void* getAtNDupVoidSmallJson(smallJsont *self, intmax_t index) {
@@ -16926,10 +19880,6 @@ internal void* getAtNDupVoidSmallJson(smallJsont *self, intmax_t index) {
e = getAtNDupSmallContainerSmallJson(self, index);
if (e) {
- if (checkObjectTypes && !isOSmallContainer(e)) {
- terminateO(e);
- return(NULL);
- }
r = e->f->get(e);
finishO(e);
}
@@ -16938,41 +19888,89 @@ internal void* getAtNDupVoidSmallJson(smallJsont *self, intmax_t index) {
internal smallContainert* getAtNDupSmallContainerSmallJson(smallJsont *self, intmax_t index) {
- smallContainert *e = (smallContainert*)getAtNDupSmallJson(self, index);
- if (checkObjectTypes && e && !isOSmallContainer(e)) {
- terminateO(e);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(NULL);
+ }
+
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *o = sArrayGetTiny(self->topA, index);
+ if (!o) {
return(NULL);
}
- return(e);
+ if (o->type != CONTAINER) {
+ return(NULL);
+ }
+ if (((sContainert*)o)->dataType == SH_DT_BASET) {
+ return(NULL);
+ }
+ smallContainert *e = (smallContainert*)toBaset(o);
+ smallContainert *r = duplicateO(e);
+ finishO(e);
+ return(r);
}
internal double getNumSmallJson(smallJsont *self, const char *key) {
- baset *o = getSmallJson(self, key);
-
+ smallt *o = NULL;
+ getJsonPath;
+ pass:
if (!o) {
return(0);
}
+ if (o->type != INT && o->type != DOUBLE) {
+ return(0);
+ }
+
+ baset *e = toBaset(o);
double r = 0;
- if (isOSmallDouble(o)) {
- r = getValO((smallDoublet*)o);
+ if (isOSmallDouble(e)) {
+ r = getValO((smallDoublet*)e);
}
- elif (isOSmallInt(o)) {
- r = getValO((smallIntt*)o);
+ elif (isOSmallInt(e)) {
+ r = getValO((smallIntt*)e);
}
- finishO(o);
+ finishO(e);
return(r);
+ fail:
+ return(0);
}
internal double getNumAtSmallJson(smallJsont *self, intmax_t index) {
- baset *o = getAtSmallJson(self, index);
+ if (self->topIsA != TOP_IS_ARRAY) {
+ return(0);
+ }
- if (!o) {
+ if (index >= (intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < -(intmax_t)lenSmallJson(self)) {
+ return(0);
+ }
+ if (index < 0) {
+ index = lenSmallJson(self) + index;
+ }
+
+ smallt *e = sArrayGetTiny(self->topA, index);
+ if (!e) {
+ return(0);
+ }
+ if (e->type != INT && e->type != DOUBLE) {
return(0);
}
+ baset *o = toBaset(e);
+
double r = 0;
if (isOSmallDouble(o)) {
r = getValO((smallDoublet*)o);
@@ -17632,6 +20630,10 @@ internal smallStringt* toYMLSmallStringSmallJson(smallJsont *self, int indent) {
internal bool parseSmallJson(smallJsont *self, char *input) {
+ if (isBlankS(input)) {
+ return(false);
+ }
+
size_t jsLen = lenS(input);
self->stack = NULL;
@@ -18515,6 +21517,7 @@ internal int writeStreamSmallJson(smallJsont *self, FILE *fp) {
}
internal int appendFileSmallJson(smallJsont *self, const char *filePath) {
+ int r;
if (!filePath) {
return(0);
@@ -18528,10 +21531,21 @@ internal int appendFileSmallJson(smallJsont *self, const char *filePath) {
if (endsWithS(tmp, ".json")) {
s = stringifySmallJson(self, 2);
} {
+ // cg_c bug if in stringifySmallJson
if (endsWithS(tmp, ".yml")) {
s = toYMLSmallJson(self, 2);
}
- int r = appendFileS(filePath, s);;
+ else if (!endsWithS(tmp, ".json")) {
+ if (self->topIsA == TOP_IS_STRING) {
+ s = strdup(sStringGetTiny(self->topS));
+ }
+ else if (self->topIsA == TOP_IS_ARRAY) {
+ r = appendTextSmallJson(self, filePath);
+ goto done;
+ }
+ }
+ r = appendFileS(filePath, s);
+ done:
freeManyS(s, tmp);
if (r) {
return(1);
@@ -21071,6 +24085,216 @@ smallJsont* sliceSmallJsonG(smallJsont *self, intmax_t start, intmax_t end) {
return(self->f->slice(self, start, end));
}
+smallJsont* cropSmallJsonG (smallJsont *self, intmax_t start, intmax_t end) {
+
+ return(self->f->crop(self, start, end));
+}
+
+char* cropSSmallJsonG (smallJsont *self, intmax_t start, intmax_t end) {
+
+ return(self->f->cropS(self, start, end));
+}
+
+smallStringt* cropSmallStringSmallJsonG (smallJsont *self, intmax_t start, intmax_t end) {
+
+ return(self->f->cropSmallString(self, start, end));
+}
+
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAt(self, index));
+}
+
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtUndefined(self, index));
+}
+
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtBool(self, index));
+}
+
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtDouble(self, index));
+}
+
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtInt(self, index));
+}
+
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtInt32(self, index));
+}
+
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtUint(self, index));
+}
+
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtUint32(self, index));
+}
+
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtS(self, index));
+}
+
+char cropElemAtCharSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtChar(self, index));
+}
+
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtDict(self, index));
+}
+
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtArray(self, index));
+}
+
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallBool(self, index));
+}
+
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallBytes(self, index));
+}
+
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallDouble(self, index));
+}
+
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallInt(self, index));
+}
+
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallJson(self, index));
+}
+
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallString(self, index));
+}
+
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtVoid(self, index));
+}
+
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index) {
+
+ return(self->f->cropElemAtSmallContainer(self, index));
+}
+
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKey(self, key));
+}
+
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyUndefined(self, key));
+}
+
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyBool(self, key));
+}
+
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyDouble(self, key));
+}
+
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyInt(self, key));
+}
+
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyInt32(self, key));
+}
+
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyUint(self, key));
+}
+
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyUint32(self, key));
+}
+
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyS(self, key));
+}
+
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyDict(self, key));
+}
+
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyArray(self, key));
+}
+
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallBool(self, key));
+}
+
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallBytes(self, key));
+}
+
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallDouble(self, key));
+}
+
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallInt(self, key));
+}
+
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallJson(self, key));
+}
+
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallString(self, key));
+}
+
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeyVoid(self, key));
+}
+
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key) {
+
+ return(self->f->cropElemKeySmallContainer(self, key));
+}
+
smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end) {
return(self->f->copy(self, start, end));
diff --git a/src/json/libsheepyCSmallJson.h b/src/json/libsheepyCSmallJson.h
@@ -1039,6 +1039,97 @@ typedef smallJsont* (*addJsonSmallJsonFt) (smallJsont *self, smallJso
typedef smallJsont* (*sliceSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
/**
+ * Crop elements from start to end
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * Crop is faster than Slice+Del because only the
+ * pointers are copied to the sliced list
+ *
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallJsont* (*cropSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+typedef char* (*cropSSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+typedef smallStringt* (*cropSmallStringSmallJsonFt) (smallJsont *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single Element
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer (terminate libsheepy objects))
+ * unchanged when list is empty
+ * NULL error
+ */
+typedef baset* (*cropElemAtSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef undefinedt* (*cropElemAtUndefinedSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef bool (*cropElemAtBoolSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef double (*cropElemAtDoubleSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef int64_t (*cropElemAtIntSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef int32_t (*cropElemAtInt32SmallJsonFt) (smallJsont *self, intmax_t index);
+typedef uint64_t (*cropElemAtUintSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef uint32_t (*cropElemAtUint32SmallJsonFt) (smallJsont *self, intmax_t index);
+typedef char* (*cropElemAtSSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef char (*cropElemAtCharSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallDictt* (*cropElemAtDictSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallArrayt* (*cropElemAtArraySmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallBoolt* (*cropElemAtSmallBoolSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallBytest* (*cropElemAtSmallBytesSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallDoublet* (*cropElemAtSmallDoubleSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallIntt* (*cropElemAtSmallIntSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallJsont* (*cropElemAtSmallJsonSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallStringt* (*cropElemAtSmallStringSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef void* (*cropElemAtVoidSmallJsonFt) (smallJsont *self, intmax_t index);
+typedef smallContainert* (*cropElemAtSmallContainerSmallJsonFt) (smallJsont *self, intmax_t index);
+
+/**
+ * Crop an Element
+ * return element for key
+ * and delete element in dictionary
+ * negative indexes are allowed
+ *
+ * \param
+ * key must exist in the dictionary
+ * \return
+ * element for key (you must free the pointer (terminate libsheepy objects))
+ * NULL error
+ */
+typedef baset* (*cropElemKeySmallJsonFt) (smallJsont *self, char* key);
+typedef undefinedt* (*cropElemKeyUndefinedSmallJsonFt) (smallJsont *self, char* key);
+typedef bool (*cropElemKeyBoolSmallJsonFt) (smallJsont *self, char* key);
+typedef double (*cropElemKeyDoubleSmallJsonFt) (smallJsont *self, char* key);
+typedef int64_t (*cropElemKeyIntSmallJsonFt) (smallJsont *self, char* key);
+typedef int32_t (*cropElemKeyInt32SmallJsonFt) (smallJsont *self, char* key);
+typedef uint64_t (*cropElemKeyUintSmallJsonFt) (smallJsont *self, char* key);
+typedef uint32_t (*cropElemKeyUint32SmallJsonFt) (smallJsont *self, char* key);
+typedef char* (*cropElemKeySSmallJsonFt) (smallJsont *self, char* key);
+typedef smallDictt* (*cropElemKeyDictSmallJsonFt) (smallJsont *self, char* key);
+typedef smallArrayt* (*cropElemKeyArraySmallJsonFt) (smallJsont *self, char* key);
+typedef smallBoolt* (*cropElemKeySmallBoolSmallJsonFt) (smallJsont *self, char* key);
+typedef smallBytest* (*cropElemKeySmallBytesSmallJsonFt) (smallJsont *self, char* key);
+typedef smallDoublet* (*cropElemKeySmallDoubleSmallJsonFt) (smallJsont *self, char* key);
+typedef smallIntt* (*cropElemKeySmallIntSmallJsonFt) (smallJsont *self, char* key);
+typedef smallJsont* (*cropElemKeySmallJsonSmallJsonFt) (smallJsont *self, char* key);
+typedef smallStringt* (*cropElemKeySmallStringSmallJsonFt) (smallJsont *self, char* key);
+typedef void* (*cropElemKeyVoidSmallJsonFt) (smallJsont *self, char* key);
+typedef smallContainert* (*cropElemKeySmallContainerSmallJsonFt) (smallJsont *self, char* key);
+
+/**
* keep elements from start and end in list, free the other elements
* negative indexes are allowed
*
@@ -2799,9 +2890,51 @@ typedef bool (*areAllEBytesSmallJsonFt) (smallJsont *self);
shiftNSmashSmallJsonFt shiftNSmash;\
shiftSmallJsonSmallJsonFt shiftSmallJson;\
shiftSmallJsonNSmashSmallJsonFt shiftSmallJsonNSmash;\
- addSmallJsonFt add;\
- addJsonSmallJsonFt addJson;\
- sliceSmallJsonFt slice;\
+ addSmallJsonFt add;\
+ addJsonSmallJsonFt addJson;\
+ sliceSmallJsonFt slice;\
+ cropSmallJsonFt crop;\
+ cropSSmallJsonFt cropS;\
+ cropSmallStringSmallJsonFt cropSmallString;\
+ cropElemAtSmallJsonFt cropElemAt;\
+ cropElemAtUndefinedSmallJsonFt cropElemAtUndefined;\
+ cropElemAtBoolSmallJsonFt cropElemAtBool;\
+ cropElemAtDoubleSmallJsonFt cropElemAtDouble;\
+ cropElemAtIntSmallJsonFt cropElemAtInt;\
+ cropElemAtInt32SmallJsonFt cropElemAtInt32;\
+ cropElemAtUintSmallJsonFt cropElemAtUint;\
+ cropElemAtUint32SmallJsonFt cropElemAtUint32;\
+ cropElemAtSSmallJsonFt cropElemAtS;\
+ cropElemAtCharSmallJsonFt cropElemAtChar;\
+ cropElemAtDictSmallJsonFt cropElemAtDict;\
+ cropElemAtArraySmallJsonFt cropElemAtArray;\
+ cropElemAtSmallBoolSmallJsonFt cropElemAtSmallBool;\
+ cropElemAtSmallBytesSmallJsonFt cropElemAtSmallBytes;\
+ cropElemAtSmallDoubleSmallJsonFt cropElemAtSmallDouble;\
+ cropElemAtSmallIntSmallJsonFt cropElemAtSmallInt;\
+ cropElemAtSmallJsonSmallJsonFt cropElemAtSmallJson;\
+ cropElemAtSmallStringSmallJsonFt cropElemAtSmallString;\
+ cropElemAtVoidSmallJsonFt cropElemAtVoid;\
+ cropElemAtSmallContainerSmallJsonFt cropElemAtSmallContainer;\
+ cropElemKeySmallJsonFt cropElemKey;\
+ cropElemKeyUndefinedSmallJsonFt cropElemKeyUndefined;\
+ cropElemKeyBoolSmallJsonFt cropElemKeyBool;\
+ cropElemKeyDoubleSmallJsonFt cropElemKeyDouble;\
+ cropElemKeyIntSmallJsonFt cropElemKeyInt;\
+ cropElemKeyInt32SmallJsonFt cropElemKeyInt32;\
+ cropElemKeyUintSmallJsonFt cropElemKeyUint;\
+ cropElemKeyUint32SmallJsonFt cropElemKeyUint32;\
+ cropElemKeySSmallJsonFt cropElemKeyS;\
+ cropElemKeyDictSmallJsonFt cropElemKeyDict;\
+ cropElemKeyArraySmallJsonFt cropElemKeyArray;\
+ cropElemKeySmallBoolSmallJsonFt cropElemKeySmallBool;\
+ cropElemKeySmallBytesSmallJsonFt cropElemKeySmallBytes;\
+ cropElemKeySmallDoubleSmallJsonFt cropElemKeySmallDouble;\
+ cropElemKeySmallIntSmallJsonFt cropElemKeySmallInt;\
+ cropElemKeySmallJsonSmallJsonFt cropElemKeySmallJson;\
+ cropElemKeySmallStringSmallJsonFt cropElemKeySmallString;\
+ cropElemKeyVoidSmallJsonFt cropElemKeyVoid;\
+ cropElemKeySmallContainerSmallJsonFt cropElemKeySmallContainer;\
copySmallJsonFt copy;\
insertSmallJsonFt insert;\
insertNSmashSmallJsonFt insertNSmash;\
@@ -3251,6 +3384,12 @@ struct smallJson {
int iProp;
sArrayt *parseP;
int istack;
+ // iterElementDataType indicates what the type baset object in iterElement
+ // if iterElement is not small* class object then finish must not be called
+ // in the iterator
+ // baset objects not from small* classes are stored directly in smallContainers
+ // values: SH_DT_UNKNOWN, SH_DT_BASET
+ char iterElementDataType;
sArrayt *stack;
void **propertyOrValue;
ssize_t iterIndex;
@@ -3665,6 +3804,48 @@ smallJsont* shiftSmallJsonNSmashSmallJsonG(smallJsont *self, smallJsont *array);
smallJsont* addSmallJsonG (smallJsont *self, smallArrayt *array);
smallJsont* addJsonSmallJsonG(smallJsont *self, smallJsont *array);
smallJsont* sliceSmallJsonG(smallJsont *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+char* cropSSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringSmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
+baset* cropElemAtSmallJsonG (smallJsont *self, intmax_t index);
+undefinedt* cropElemAtUndefinedSmallJsonG (smallJsont *self, intmax_t index);
+bool cropElemAtBoolSmallJsonG (smallJsont *self, intmax_t index);
+double cropElemAtDoubleSmallJsonG (smallJsont *self, intmax_t index);
+int64_t cropElemAtIntSmallJsonG (smallJsont *self, intmax_t index);
+int32_t cropElemAtInt32SmallJsonG (smallJsont *self, intmax_t index);
+uint64_t cropElemAtUintSmallJsonG (smallJsont *self, intmax_t index);
+uint32_t cropElemAtUint32SmallJsonG (smallJsont *self, intmax_t index);
+char* cropElemAtSSmallJsonG (smallJsont *self, intmax_t index);
+char cropElemAtCharSmallJsonG (smallJsont *self, intmax_t index);
+smallDictt* cropElemAtDictSmallJsonG (smallJsont *self, intmax_t index);
+smallArrayt* cropElemAtArraySmallJsonG (smallJsont *self, intmax_t index);
+smallBoolt* cropElemAtSmallBoolSmallJsonG (smallJsont *self, intmax_t index);
+smallBytest* cropElemAtSmallBytesSmallJsonG (smallJsont *self, intmax_t index);
+smallDoublet* cropElemAtSmallDoubleSmallJsonG (smallJsont *self, intmax_t index);
+smallIntt* cropElemAtSmallIntSmallJsonG (smallJsont *self, intmax_t index);
+smallJsont* cropElemAtSmallJsonSmallJsonG (smallJsont *self, intmax_t index);
+smallStringt* cropElemAtSmallStringSmallJsonG (smallJsont *self, intmax_t index);
+void* cropElemAtVoidSmallJsonG (smallJsont *self, intmax_t index);
+smallContainert* cropElemAtSmallContainerSmallJsonG (smallJsont *self, intmax_t index);
+baset* cropElemKeySmallJsonG (smallJsont *self, char* key);
+undefinedt* cropElemKeyUndefinedSmallJsonG (smallJsont *self, char* key);
+bool cropElemKeyBoolSmallJsonG (smallJsont *self, char* key);
+double cropElemKeyDoubleSmallJsonG (smallJsont *self, char* key);
+int64_t cropElemKeyIntSmallJsonG (smallJsont *self, char* key);
+int32_t cropElemKeyInt32SmallJsonG (smallJsont *self, char* key);
+uint64_t cropElemKeyUintSmallJsonG (smallJsont *self, char* key);
+uint32_t cropElemKeyUint32SmallJsonG (smallJsont *self, char* key);
+char* cropElemKeySSmallJsonG (smallJsont *self, char* key);
+smallDictt* cropElemKeyDictSmallJsonG (smallJsont *self, char* key);
+smallArrayt* cropElemKeyArraySmallJsonG (smallJsont *self, char* key);
+smallBoolt* cropElemKeySmallBoolSmallJsonG (smallJsont *self, char* key);
+smallBytest* cropElemKeySmallBytesSmallJsonG (smallJsont *self, char* key);
+smallDoublet* cropElemKeySmallDoubleSmallJsonG (smallJsont *self, char* key);
+smallIntt* cropElemKeySmallIntSmallJsonG (smallJsont *self, char* key);
+smallJsont* cropElemKeySmallJsonSmallJsonG (smallJsont *self, char* key);
+smallStringt* cropElemKeySmallStringSmallJsonG (smallJsont *self, char* key);
+void* cropElemKeyVoidSmallJsonG (smallJsont *self, char* key);
+smallContainert* cropElemKeySmallContainerSmallJsonG(smallJsont *self, char* key);
smallJsont* copySmallJsonG (smallJsont *self, intmax_t start, intmax_t end);
smallJsont* insertSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
smallJsont* insertNSmashSmallJsonG(smallJsont *self, intmax_t index, smallArrayt *toInsert);
diff --git a/src/json/libsheepyCSmallJsonInternal.h b/src/json/libsheepyCSmallJsonInternal.h
@@ -34,7 +34,7 @@ declareRecycle(smallJsont);
#define walkJsonPath(getSmallObj, arrayCode, dictCode, returnFail, directHit, keyErrorReturn)\
;/*avoid error: a label can only be part of a statement and a declaration is not a statement */\
- if (!key) return keyErrorReturn;\
+ if (!key) {keyErrorReturn;}\
/* check key type */\
jsonPathRest keyType = keyIsSmallJson(self, key);\
if (keyType == NOT_A_PATH) {\
@@ -65,17 +65,17 @@ declareRecycle(smallJsont);
/* oo is from the smallJson and is an array */\
a = (sArrayt **) oo;\
/* verify that d is an sArray */\
- if ((*a)->type != ARRAY) {free(keyInPath);return keyErrorReturn;}\
+ if ((*a)->type != ARRAY) {free(keyInPath);keyErrorReturn;}\
}\
\
/* check that array a exists */\
- if (!*a) {free(keyInPath);return keyErrorReturn;}\
+ if (!*a) {free(keyInPath);keyErrorReturn;}\
\
int64_t idx = parseInt(keyInPath);\
/* convert python index (negative index) */\
int64_t len = (*a)->count;\
- if (idx >= len) {free(keyInPath);return keyErrorReturn;}\
- if (idx < -len) {free(keyInPath);return keyErrorReturn;}\
+ if (idx >= len) {free(keyInPath);keyErrorReturn;}\
+ if (idx < -len) {free(keyInPath);keyErrorReturn;}\
if (idx < 0) {idx = len + idx;}\
if (!*(next+1)) {\
arrayCode;\
@@ -102,7 +102,7 @@ declareRecycle(smallJsont);
/* oo is from the smallJson and is a dict */\
d = (sDictt **) oo;\
/* verify that d is an sDict */\
- if ((*d)->type != DICT) {free(keyInPath);return keyErrorReturn;}\
+ if ((*d)->type != DICT) {free(keyInPath);keyErrorReturn;}\
}\
\
unescapeKey(keyInPath, keyInPath, keyLen);\
@@ -126,31 +126,30 @@ declareRecycle(smallJsont);
}
#define setJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetTiny(*a, idx, o)/*arrayCode*/, sDictSetTiny(d, keyInPath, o)/*dictCode*/, /*returnFail*/, sDictSetTiny(&(self->top), key, o); return self/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetTiny(*a, idx, o)/*arrayCode*/, sDictSetTiny(d, keyInPath, o)/*dictCode*/, /*returnFail*/, sDictSetTiny(&(self->top), key, o); return self/*directHit*/, return NULL/*keyErrorReturn*/)
#define setPJsonPath(objP)\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetP(*a, idx, objP)/*arrayCode*/, sDictSetP(d, keyInPath, objP)/*dictCode*/, /*returnFail*/, sDictSetP(&(self->top), key, objP); return self/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetP(*a, idx, objP)/*arrayCode*/, sDictSetP(d, keyInPath, objP)/*dictCode*/, /*returnFail*/, sDictSetP(&(self->top), key, objP); return self/*directHit*/, return NULL/*keyErrorReturn*/)
#define setPNFreeJsonPath(objP, finishArg)\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetP(*a, idx, objP)/*arrayCode*/, sDictSetP(d, keyInPath, objP)/*dictCode*/, /*returnFail*/, sDictSetP(&(self->top), key, objP); finishArg ; return self/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, sArraySetP(*a, idx, objP)/*arrayCode*/, sDictSetP(d, keyInPath, objP)/*dictCode*/, /*returnFail*/, sDictSetP(&(self->top), key, objP); finishArg ; return self/*directHit*/, return NULL/*keyErrorReturn*/)
+// this macro jumps to the 'fail' label when there is an error
+// and jumps to the 'pass' label when the element is found and the o variable is set
#define getJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;} o = *oo/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, return toBaset(sDictGetTiny(self->top, key))/*directHit*/, NULL/*keyErrorReturn*/)
-
-#define getNDupJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;} o = *oo/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, return toBaset(sDuplicate(sDictGetTiny(self->top, key)))/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);goto fail;} o = *oo/*getSmallObj*/, if (!*a) {free(keyInPath);goto fail;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);goto fail;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) goto fail/*returnFail*/, o = sDictGetTiny(self->top, key); goto pass/*directHit*/, goto fail/*keyErrorReturn*/)
#define delJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} sArrayDelTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} sDictDelTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, sDictDelTiny(self->top, key) ; return self/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} sArrayDelTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} sDictDelTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, sDictDelTiny(self->top, key) ; return self/*directHit*/, return NULL/*keyErrorReturn*/)
#define typeStringJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return NULL; return SMALL_TYPE_NAMES[(size_t)o->type]/*directHit*/, NULL/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return NULL;}/*getSmallObj*/, if (!*a) {free(keyInPath);return NULL;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return NULL;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return NULL/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return NULL; return SMALL_TYPE_NAMES[(size_t)o->type]/*directHit*/, return NULL/*keyErrorReturn*/)
#define typeJsonPath\
- walkJsonPath(if (!oo) {free(keyInPath);return 0;}/*getSmallObj*/, if (!*a) {free(keyInPath);return 0;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return 0;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return 0/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return 0; return o->type/*directHit*/, 0/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return 0;}/*getSmallObj*/, if (!*a) {free(keyInPath);return 0;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return 0;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return 0/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return 0; return o->type/*directHit*/, return 0/*keyErrorReturn*/)
#define isEJsonPath(test)\
- walkJsonPath(if (!oo) {free(keyInPath);return 0;}/*getSmallObj*/, if (!*a) {free(keyInPath);return 0;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return 0;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return 0/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return false; return test/*directHit*/, 0/*keyErrorReturn*/)
+ walkJsonPath(if (!oo) {free(keyInPath);return 0;}/*getSmallObj*/, if (!*a) {free(keyInPath);return 0;} o = sArrayGetTiny(*a, idx)/*arrayCode*/, if (!*d) {free(keyInPath);return 0;} o = sDictGetTiny(*d, keyInPath)/*dictCode*/, if (!self->top) return 0/*returnFail*/, o = sDictGet(self->top, key) ; if (!o) return false; return test/*directHit*/, return 0/*keyErrorReturn*/)
#define mainSetJsonPath(initValue, allocValue, subSetJsonPath) \
smallt *o = NULL;\
diff --git a/src/json/libsheepyCSmallString.c b/src/json/libsheepyCSmallString.c
@@ -188,6 +188,10 @@ internal smallStringt* icUniqSmallString(smallStringt *self, char c);
internal char getAtSmallString(smallStringt *self, intmax_t index);
internal smallStringt* setAtSmallString(smallStringt *self, intmax_t index, char c);
internal smallStringt* sliceSmallString(smallStringt *self, intmax_t start, intmax_t end);
+internal smallStringt* cropSmallString(smallStringt *self, intmax_t start, intmax_t end);
+internal char* cropSSmallString(smallStringt *self, intmax_t start, intmax_t end);
+internal smallJsont* cropSmallJsonSmallString(smallStringt *self, intmax_t start, intmax_t end);
+internal char cropElemSmallString(smallStringt *self, intmax_t index);
internal smallStringt* copySmallString(smallStringt *self, intmax_t start, intmax_t end);
internal smallStringt* insertSmallString(smallStringt *self, intmax_t index, smallStringt *toInsert);
internal smallStringt* insertSmallJsonSmallString(smallStringt *self, intmax_t index, smallJsont *toInsert);
@@ -413,6 +417,10 @@ smallStringt* rTrimSmallStringG (smallStringt *self);
smallStringt* uniqSmallStringG (smallStringt *self, char c);
smallStringt* icUniqSmallStringG (smallStringt *self, char c);
smallStringt* sliceSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+char* cropSSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonSmallStringG(smallStringt *self, intmax_t start, intmax_t end);
+char cropElemSmallStringG (smallStringt *self, intmax_t index);
smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end);
smallStringt* insertSmallStringG (smallStringt *self, intmax_t index, smallStringt *toInsert);
smallStringt* insertSmallJsonSmallStringG (smallStringt *self, intmax_t index, smallJsont *toInsert);
@@ -670,6 +678,10 @@ void registerMethodsSmallString(smallStringFunctionst *f) {
f->getAt = getAtSmallString;
f->setAt = setAtSmallString;
f->slice = sliceSmallString;
+ f->crop = cropSmallString;
+ f->cropS = cropSSmallString;
+ f->cropSmallJson = cropSmallJsonSmallString;
+ f->cropElem = cropElemSmallString;
f->copy = copySmallString;
f->insert = insertSmallString;
f->insertSmallJson = insertSmallJsonSmallString;
@@ -916,7 +928,7 @@ internal char* getSmallString(smallStringt *self) {
internal smallStringt* setSmallString(smallStringt *self, const char *string) {
if (!string) {
- return(self);
+ return(NULL);
}
sStringSetTiny(&self->data, string);
self->_len = strlen(string);
@@ -975,67 +987,85 @@ internal smallStringt* setUint64SmallString(smallStringt* self, uint64_t p2) {
internal smallStringt* setSmallArraySmallString(smallStringt* self, smallArrayt* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setFromSmallDictSmallString(smallStringt* self, smallDictt* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setFromSmallJsonSmallString(smallStringt* self, smallJsont* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setSmallBoolSmallString(smallStringt* self, smallBoolt* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setSmallDoubleSmallString(smallStringt* self, smallDoublet* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setSmallIntSmallString(smallStringt* self, smallIntt* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
char *s = toStringO(p2);
- setNFreeSmallString(self, s);
+ smallStringt *r = setNFreeSmallString(self, s);
+ if (!r) {
+ free(s);
+ }
return(self);
}
internal smallStringt* setSmallJsonSmallString(smallStringt* self, smallJsont* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
const char *type = getTopTypeO(p2);
@@ -1075,7 +1105,7 @@ internal smallStringt* setSmallJsonSmallString(smallStringt* self, smallJsont* p
internal smallStringt* setSmallStringSmallString(smallStringt* self, smallStringt* p2) {
if (!p2) {
- return(self);
+ return(NULL);
}
setSmallString(self, ssGet(p2));
return(self);
@@ -1084,17 +1114,22 @@ internal smallStringt* setSmallStringSmallString(smallStringt* self, smallString
internal smallStringt* setNFreeSmallString(smallStringt *self, char *string) {
if (!string) {
- return(self);
+ return(NULL);
+ }
+ smallStringt *r = setSmallString(self, string);;
+ if (r) {
+ free(string);
}
- setSmallString(self, string);
- free(string);
return(self);
}
internal smallStringt* appendSmallString(smallStringt *self, smallStringt *string) {
// sanity
- if (!string || !string->data) {
+ if (!string) {
+ return(NULL);
+ }
+ if (!string->data) {
return(self);
}
@@ -1125,7 +1160,7 @@ internal smallStringt* appendSmallString(smallStringt *self, smallStringt *strin
internal smallStringt* appendSmallJsonSmallString(smallStringt *self, smallJsont *string) {
if (!string) {
- return(self);
+ return(NULL);
}
const char *type = getTopTypeO(string);
@@ -1140,7 +1175,10 @@ internal smallStringt* appendSmallJsonSmallString(smallStringt *self, smallJsont
internal smallStringt* appendNSmashSmallString(smallStringt *self, smallStringt *string) {
// sanity
- if (!string || !string->data) {
+ if (!string) {
+ return(NULL);
+ }
+ if (!string->data) {
return(self);
}
@@ -1173,7 +1211,10 @@ internal smallStringt* appendNSmashSmallString(smallStringt *self, smallStringt
internal smallStringt* appendSSmallString(smallStringt *self, char *string) {
// sanity
- if (!string || !*string) {
+ if (!string) {
+ return(NULL);
+ }
+ if (!*string) {
return(self);
}
@@ -1212,7 +1253,7 @@ internal smallStringt* appendCharSmallString(smallStringt *self, char c) {
internal smallStringt* appendNSmashSmallJsonSmallString(smallStringt *self, smallJsont *string) {
if (!string) {
- return(self);
+ return(NULL);
}
const char *type = getTopTypeO(string);
@@ -1234,14 +1275,19 @@ internal smallStringt* appendNSmashSmallJsonSmallString(smallStringt *self, smal
internal smallStringt* appendNSmashSSmallString(smallStringt *self, char *string) {
smallStringt *r = appendSSmallString(self, string);
- free(string);
+ if (r) {
+ free(string);
+ }
return(r);
}
internal smallStringt* prependSmallString(smallStringt *self, smallStringt *string) {
// sanity
- if (!string || !string->data) {
+ if (!string) {
+ return(NULL);
+ }
+ if (!string->data) {
return(self);
}
@@ -1264,7 +1310,7 @@ internal smallStringt* prependSmallJsonSmallString(smallStringt *self, smallJson
// sanity
if (!json) {
- return(self);
+ return(NULL);
}
const char *type = getTopTypeO(json);
@@ -1279,7 +1325,10 @@ internal smallStringt* prependSmallJsonSmallString(smallStringt *self, smallJson
internal smallStringt* prependNSmashSmallString(smallStringt *self, smallStringt *string) {
// sanity
- if (!string || !string->data) {
+ if (!string) {
+ return(NULL);
+ }
+ if (!string->data) {
return(self);
}
@@ -1303,7 +1352,7 @@ internal smallStringt* prependNSmashSmallJsonSmallString(smallStringt *self, sma
// sanity
if (!json) {
- return(self);
+ return(NULL);
}
const char *type = getTopTypeO(json);
@@ -1322,7 +1371,7 @@ internal smallStringt* prependSSmallString(smallStringt *self, char *string) {
// sanity
if (!string) {
- return(self);
+ return(NULL);
}
size_t len = strlen(string);
@@ -3193,6 +3242,125 @@ internal smallStringt* sliceSmallString(smallStringt *self, intmax_t start, intm
return(self);
}
+internal smallStringt* cropSmallString(smallStringt *self, intmax_t start, intmax_t end) {
+
+ char *cropped = cropSSmallString(self, start, end);
+
+ if (!cropped) {
+ return(NULL);
+ }
+
+ smallStringt *r = allocSmallString(cropped);
+ free(cropped);
+ return(r);
+}
+
+internal char* cropSSmallString(smallStringt *self, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!self->data) {
+ return(NULL);
+ }
+
+ len = self->_len;
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = malloc((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ char *string = sStringGetTiny(self->data);
+ strLCpy(l, (n+1) * sizeof(char), string+start);
+ strLCpy(string+start, len-end+1, string+end);
+ self->_len -= n;
+ }
+
+ return(l);
+}
+
+
+
+internal smallJsont* cropSmallJsonSmallString(smallStringt *self, intmax_t start, intmax_t end) {
+
+ char *cropped = cropSSmallString(self, start, end);
+
+ if (!cropped) {
+ return(NULL);
+ }
+
+ createAllocateSmallJson(r);
+ setTopStringO(r, cropped);
+ free(cropped);
+ return(r);
+}
+
+
+
+
+internal char cropElemSmallString(smallStringt *self, intmax_t index) {
+ intmax_t len;
+
+ // sanity checks
+ if (!self->data) {
+ return(0);
+ }
+
+ len = self->_len;
+ if (index >= len) {
+ return(0);
+ }
+ if (index < -len) {
+ return(0);
+ }
+ if (index < 0) {
+ index = len + index;
+ }
+
+ char *string = sStringGetTiny(self->data);
+
+ char r = *(string+index);
+
+ if (index == len-1) {
+ string[len-1] = 0;
+ }
+ else {
+ strLCpy(string+index, len-1, string+index+1);
+ }
+
+ self->_len--;
+
+ return(r);
+}
+
+
+
internal smallStringt* copySmallString(smallStringt *self, intmax_t start, intmax_t end) {
char *s = NULL;
@@ -3249,11 +3417,18 @@ internal smallStringt* insertSmallString(smallStringt *self, intmax_t index, sma
char *r = NULL;
// sanity checks
- if (!self->data) {
+ if (!toInsert) {
return(NULL);
}
- if (!toInsert || !toInsert->data || !toInsert->_len) {
- return(NULL);
+ if (!self->data) {
+ if (index) {
+ return(NULL);
+ }
+ if (toInsert->data) {
+ self->data = (sStringt*)sDuplicateTiny((smallt*)toInsert->data);
+ self->_len = toInsert->_len;
+ }
+ return(self);
}
if (!self->_len && index == -1) {
@@ -3278,6 +3453,9 @@ internal smallStringt* insertSmallString(smallStringt *self, intmax_t index, sma
index = self->_len + index;
}
+ if (!toInsert->data || !toInsert->_len) {
+ return(self);
+ }
if (index == 0) {
// insert at beginning
@@ -3303,7 +3481,7 @@ internal smallStringt* insertSmallJsonSmallString(smallStringt *self, intmax_t i
return(NULL);
}
- if (checkObjectTypes && !isOSmallJson(toInsert)) {
+ if (checkObjectTypes && toInsert && !isOSmallJson(toInsert)) {
return(NULL);
}
@@ -3320,11 +3498,17 @@ internal smallStringt* insertSSmallString(smallStringt *self, intmax_t index, co
char *r = NULL;
// sanity checks
- if (!self->data) {
+ if (!toInsert) {
return(NULL);
}
- if (!toInsert || !*toInsert) {
- return(NULL);
+ if (!self->data) {
+ if (index) {
+ return(NULL);
+ }
+ char header[2] = {STRING ,0};
+ self->data = (sStringt*) catS(header, toInsert);
+ self->_len = strlen(toInsert);
+ return(self);
}
if (!self->_len && index == -1) {
@@ -3349,6 +3533,9 @@ internal smallStringt* insertSSmallString(smallStringt *self, intmax_t index, co
index = self->_len + index;
}
+ if (!*toInsert) {
+ return(self);
+ }
if (index == 0) {
// insert at beginning
@@ -3372,21 +3559,27 @@ internal smallStringt* insertSSmallString(smallStringt *self, intmax_t index, co
internal smallStringt* insertNFreeSmallString(smallStringt *self, intmax_t index, smallStringt *toInsert) {
smallStringt *r = insertSmallString(self, index, toInsert);
- terminateO(toInsert);
+ if (r) {
+ terminateO(toInsert);
+ }
return(r);
}
internal smallStringt* insertNFreeSmallJsonSmallString(smallStringt *self, intmax_t index, smallJsont *toInsert) {
smallStringt *r = insertSmallJsonSmallString(self, index, toInsert);
- terminateO(toInsert);
+ if (r) {
+ terminateO(toInsert);
+ }
return(r);
}
internal smallStringt* insertSNFreeSmallString(smallStringt *self, intmax_t index, char *toInsert) {
smallStringt *r = insertSSmallString(self, index, toInsert);
- free(toInsert);
+ if (r) {
+ free(toInsert);
+ }
return(r);
}
@@ -3395,7 +3588,13 @@ internal smallStringt* injectSmallString(smallStringt *self, intmax_t index, cha
// sanity checks
if (!self->data) {
- return(NULL);
+ if (index) {
+ return(NULL);
+ }
+ char tmp[3] = {STRING, toInject, 0};
+ self->data = (sStringt*) strdup(tmp);
+ self->_len = 1;
+ return(self);
}
if (!self->_len && index == -1) {
@@ -5491,6 +5690,26 @@ smallStringt* sliceSmallStringG (smallStringt *self, intmax_t start, int
return(self->f->slice(self, start, end));
}
+smallStringt* cropSmallStringG (smallStringt *self, intmax_t start, intmax_t end) {
+
+ return(self->f->crop(self, start, end));
+}
+
+char* cropSSmallStringG (smallStringt *self, intmax_t start, intmax_t end) {
+
+ return(self->f->cropS(self, start, end));
+}
+
+smallJsont* cropSmallJsonSmallStringG(smallStringt *self, intmax_t start, intmax_t end) {
+
+ return(self->f->cropSmallJson(self, start, end));
+}
+
+char cropElemSmallStringG (smallStringt *self, intmax_t index) {
+
+ return(self->f->cropElem(self, index));
+}
+
smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end) {
return(self->f->copy(self, start, end));
diff --git a/src/json/libsheepyCSmallString.h b/src/json/libsheepyCSmallString.h
@@ -571,6 +571,44 @@ typedef smallStringt* (*setAtSmallStringFt) (smallStringt *self, intmax
typedef smallStringt* (*sliceSmallStringFt) (smallStringt *self, intmax_t start, intmax_t end);
/**
+ * Crop characters from start to end
+ * return a new string with characters from start and end
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * start index, must be in the string
+ * \param
+ * end index, must be in the string
+ * \return
+ * new sliced string (you must free (terimate) the pointer)
+ * empty list when start=end
+ * unchanged when string is empty
+ * unchanged when string is NULL or when start and end are not set correctly
+ * NULL error
+ */
+typedef smallStringt* (*cropSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+typedef char* (*cropSSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+typedef smallJsont* (*cropSmallJsonSmallStringFt)(smallStringt *self, intmax_t start, intmax_t end);
+
+
+/**
+ * Crop a single character
+ * return character at index
+ * and delete character at index in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * index must be in the string
+ * \return
+ * character at index
+ * unchanged when list is empty
+ * 0 error
+ */
+typedef char (*cropElemSmallStringFt)(smallStringt *self, intmax_t index);
+
+
+/**
* copy string between start and end
* self becomes the smallString between start and end
* negative indexes are allowed
@@ -1105,6 +1143,10 @@ typedef int (*appendFileSmallStringSmallStringFt)(smallStringt *self, smallStrin
getAtSmallStringFt getAt;\
setAtSmallStringFt setAt;\
sliceSmallStringFt slice;\
+ cropSmallStringFt crop;\
+ cropSSmallStringFt cropS;\
+ cropSmallJsonSmallStringFt cropSmallJson;\
+ cropElemSmallStringFt cropElem;\
copySmallStringFt copy;\
insertSmallStringFt insert;\
insertSmallJsonSmallStringFt insertSmallJson;\
@@ -1381,6 +1423,10 @@ smallStringt* rTrimSmallStringG (smallStringt *self);
smallStringt* uniqSmallStringG (smallStringt *self, char c);
smallStringt* icUniqSmallStringG (smallStringt *self, char c);
smallStringt* sliceSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallStringt* cropSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+char* cropSSmallStringG (smallStringt *self, intmax_t start, intmax_t end);
+smallJsont* cropSmallJsonSmallStringG(smallStringt *self, intmax_t start, intmax_t end);
+char cropElemSmallStringG (smallStringt *self, intmax_t index);
smallStringt* copySmallStringG(smallStringt *self, intmax_t start, intmax_t end);
smallStringt* insertSmallStringG (smallStringt *self, intmax_t index, smallStringt *toInsert);
smallStringt* insertSmallJsonSmallStringG (smallStringt *self, intmax_t index, smallJsont *toInsert);
diff --git a/src/json/libsheepyObject.c b/src/json/libsheepyObject.c
@@ -218,6 +218,9 @@ bool writeTextSG(char **list, const char *filePath);
bool writeTextStreamG(char **list, FILE *fp);
bool writeTextCG(const char **list, const char *filePath);
bool writeTextStreamCG(const char **list, FILE *fp);
+bool appendFileSG(const char *string, const char *filePath);
+bool appendTextSG(char **list, const char *filePath);
+bool appendTextCG(const char **list, const char *filePath);
int mkdirParentsSmallJsonO(smallJsont* path);
int mkdirParentsO(smallStringt* path);
int rmAllSmallJsonO(smallJsont* path);
@@ -465,6 +468,7 @@ bool icEqualOSmallArrayG(baset* p1, smallArrayt* p2);
bool icEqualOSmallDictG(baset* p1, smallDictt* p2);
bool icEqualOSmallJsonG(baset* p1, smallJsont* p2);
bool icEqualOSmallStringG(baset* p1, smallStringt* p2);
+void freeBasetInContainer(void *baseo);
smallt *toSmallt(baset *obj);
baset *toBaset(smallt *obj);
int cpuCount(void);
@@ -2477,6 +2481,21 @@ bool writeTextStreamCG(const char **list, FILE *fp) {
return(writeStream(fp, (char**)list));
}
+bool appendFileSG(const char *string, const char *filePath) {
+
+ return(appendFileS(filePath, string));
+}
+
+bool appendTextSG(char **list, const char *filePath) {
+
+ return(appendText(filePath, list));
+}
+
+bool appendTextCG(const char **list, const char *filePath) {
+
+ return(appendText(filePath, (char**)list));
+}
+
int mkdirParentsSmallJsonO(smallJsont* path) {
if (!path) {
@@ -5001,6 +5020,12 @@ bool icEqualOSmallStringG(baset* p1, smallStringt* p2) {
// TODO format function, print objects, stderr print
+void freeBasetInContainer(void *baseo) {
+
+ // Terminate baset object
+ cast(baset*,o,baseo);
+ terminateO(o);
+}
// TODO duplicate strings? cannot be shared between objects
smallt *toSmallt(baset *obj) {
@@ -5062,8 +5087,11 @@ smallt *toSmallt(baset *obj) {
}
}
else {
- //if isOType(obj, "smallJson")
- return(NULL);
+ // store other baset object in sContainers
+ sContainert *c = allocSContainer(obj);
+ c->dataType = SH_DT_BASET;
+ c->free = freeBasetInContainer;
+ r = (smallt *) c;
}
return(r);
@@ -5101,9 +5129,15 @@ baset *toBaset(smallt *obj) {
r = (baset *)B;
break;
case CONTAINER:
- initiateAllocateSmallContainer(&c);
- c->data = (sContainert *)obj;
- r = (baset *)c;
+ ;cast(sContainert*, sc, obj);
+ if (sc->dataType == SH_DT_BASET) {
+ r = (baset *)sc->data;
+ }
+ else {
+ initiateAllocateSmallContainer(&c);
+ c->data = (sContainert *)obj;
+ r = (baset *)c;
+ }
break;
case DICT:
initiateAllocateSmallDict(&d);
diff --git a/src/json/libsheepyObjectTest.c b/src/json/libsheepyObjectTest.c
@@ -84,10 +84,10 @@ START_TEST(cSmallDictT)
smashO(st);
smashO(oBool2);
ck_assert_ptr_eq(o, NULL);
- // set NULL
+ // set NULL (not possible)
obj2->f->set(obj2, NULL, NULL);
obj2->f->set(obj2, "no", NULL);
- ck_assert_uint_eq(obj2->f->len(obj2), 4);
+ ck_assert_uint_eq(obj2->f->len(obj2), 3);
// get non existing element
oBool3 = (smallBoolt *)obj2->f->get(obj2, "non existing");
ck_assert_ptr_eq(oBool3, NULL);
@@ -105,10 +105,9 @@ START_TEST(cSmallDictT)
ck_assert(obj2->f->has(obj2, "u"));
// keys
char **keys = obj2->f->keys(obj2);
- ck_assert_uint_eq(listLengthS(keys), 3);
+ ck_assert_uint_eq(listLengthS(keys), 2);
ck_assert_str_eq(keys[0], "u");
ck_assert_str_eq(keys[1], "str");
- ck_assert_str_eq(keys[2], "no");
listFreeS(keys);
// empty dict
initiateAllocateSmallDict(&o);
@@ -118,7 +117,7 @@ START_TEST(cSmallDictT)
// values
smallArrayt *values = obj2->f->values(obj2);
s = toStringO(values);
- ck_assert_str_eq(s, "[null,\"sheepy\",null]");
+ ck_assert_str_eq(s, "[null,\"sheepy\"]");
free(s);
values->f->smash(&values);
// empty dict
@@ -135,11 +134,11 @@ START_TEST(cSmallDictT)
oM->f->set(oM, "str", (baset *) st);
finishO(st);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->merge(o, oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"SHEEPY MERGED\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"SHEEPY MERGED\"}");
free(s);
oM->f->smash(&oM);
terminateO(o);
@@ -147,22 +146,22 @@ START_TEST(cSmallDictT)
o = obj2->f->duplicate(obj2);
initiateAllocateSmallDict(&oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->merge(o, oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
oM->f->smash(&oM);
terminateO(o);
// NULL dict
o = obj2->f->duplicate(obj2);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->merge(o, NULL);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
terminateO(o);
// append
@@ -176,11 +175,11 @@ START_TEST(cSmallDictT)
oM->f->set(oM, "u2", (baset *) oU);
finishO(oU);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->append(o, oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null,\"u2\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"u2\":null}");
free(s);
data = sDictGetTiny(oM->d, "str");
sFree(data);
@@ -190,26 +189,26 @@ START_TEST(cSmallDictT)
o = obj2->f->duplicate(obj2);
initiateAllocateSmallDict(&oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->append(o, oM);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
oM->f->smash(&oM);
terminateO(o);
// NULL dict
o = obj2->f->duplicate(obj2);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
o->f->append(o, NULL);
s = toStringO(o);
- ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\",\"no\":null}");
+ ck_assert_str_eq(s, "{\"u\":null,\"str\":\"sheepy\"}");
free(s);
terminateO(o);
// len
- ck_assert_uint_eq(obj2->f->len(obj2), 3);
+ ck_assert_uint_eq(obj2->f->len(obj2), 2);
// empty dict
initiateAllocateSmallDict(&o);
ck_assert_uint_eq(o->f->len(o), 0);
@@ -1238,7 +1237,7 @@ START_TEST(cSmallArrayT)
// delete an element
smallArrayt *o2;
o2 = obj2->f->duplicate(obj2);
- o2->f->setAt(o2, 0, NULL);
+ o2->f->delElem(o2, 0);
s = o2->f->toString(o2);
ck_assert_str_eq(s, "[123,\"sheepy\"]");
free(s);
@@ -1261,7 +1260,7 @@ START_TEST(cSmallArrayT)
terminateO(o);
// delete an element
o2 = obj2->f->duplicate(obj2);
- o2->f->setAt(o2, 0, NULL);
+ o2->f->delElem(o2, 0);
o = o2->f->duplicate(o2);
in = (smallIntt *) o->f->getAt(o, 0);
ck_assert(in->value->value == 123);
@@ -1329,7 +1328,7 @@ START_TEST(cSmallArrayT)
smashO(in);
// NULL
o->f->push(o, NULL);
- ck_assert_uint_eq(o->f->len(o), 5);
+ ck_assert_uint_eq(o->f->len(o), 4);
terminateO(o);
// pop
o = obj2->f->duplicate(obj2);
@@ -1559,8 +1558,8 @@ START_TEST(cSmallArrayT)
in->value->value = 789;
o2->f->setAt(o2, 1, (baset *)in);
finishO(in);
- o->f->setAt(o, 1, NULL);
- o->f->setAt(o, 2, NULL);
+ o->f->delElem(o, 1);
+ o->f->delElem(o, 2);
o->f->trim(o);
o->f->insert(o, -1, o2);
s = toStringO(o);
@@ -1698,7 +1697,7 @@ START_TEST(cSmallArrayT)
ck_assert_uint_eq(o->f->len(o), 3);
st = (smallStringt *) o->f->pop(o);
terminateO(st);
- o->f->setAt(o, 0, NULL);
+ o->f->delElem(o, 0);
o->f->trim(o);
ck_assert_uint_eq(o->f->len(o), 1);
s = toStringO(o);
@@ -1781,19 +1780,19 @@ START_TEST(cSmallArrayT)
ck_assert_uint_eq(c, STRING);
// negative index
c = o->f->type(o, -2);
- ck_assert_uint_eq(c, STRING);
+ ck_assert_uint_eq(c, INT);
// outside
ck_assert(!o->f->type(o, 10));
ck_assert(!o->f->type(o, -14));
// NULL element
- c = o->f->type(o, 3);
+ c = o->f->type(o, 0);
ck_assert_uint_eq(c, UNDEFINED);
// empty object
ck_assert(!o2->f->type(o2, 0));
// typeStrings
char **l = o->f->typeStrings(o);
s = join(l, ",");
- ck_assert_str_eq(s, "undefined,int,string,undefined");
+ ck_assert_str_eq(s, "undefined,int,string");
free(s);
free(l);
// empty object
@@ -1801,7 +1800,7 @@ START_TEST(cSmallArrayT)
// types
smallBytest *B = o->f->types(o);
s = sToStringTiny((smallt *)B->B);
- ck_assert_str_eq(s, "[0x01,0x07,0x08,0x01]");
+ ck_assert_str_eq(s, "[0x01,0x07,0x08]");
free(s);
// empty object
ck_assert_ptr_eq(o2->f->types(o2), NULL);
@@ -2257,8 +2256,11 @@ START_TEST(toSmalltT)
sFree((smallt *) sd);
// smallJson
createAllocateSmallJson(j);
- ck_assert_ptr_eq(toSmallt((baset *)j), NULL);
- terminateO(j);
+ smallt *so = toSmallt((baset *)j);
+ ck_assert_ptr_ne(so, NULL);
+ ck_assert_int_eq(so->type, CONTAINER);
+ ck_assert_ptr_eq(((sContainert*)so)->data, j);
+ sFree(so); // sFree does terminateO(j); because smallJson is stored in a container
// NULL
ck_assert_ptr_eq(toSmallt(NULL), NULL);
diff --git a/src/libsheepy.c b/src/libsheepy.c
@@ -91,6 +91,9 @@ int getLogMode(void);
void setLogMode(int mode);
bool getLogShortPath(void);
void setLogShortPath(bool shortPath);
+bool getLogStdout(void);
+void setLogStdout(bool state);
+bool openProgLogFile(void);
void _pLog(int loglevel, const char *file, const char *func, int line, const char *msg, ...);
#if (!(__APPLE__ || __FreeBSD__ || __TERMUX__ || __OpenBSD__ || __DragonFly__ || MUSL_LIBC || __sun__ || __HAIKU__))
int print_k(FILE *stream, const struct printf_info *info, const void *const *args);
@@ -420,6 +423,10 @@ char *sliceS(const char *string, intmax_t start, intmax_t end);
char *iSliceS(char **string, intmax_t start, intmax_t end);
char *bSliceS(char *string, intmax_t start, intmax_t end);
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end);
+char *cropS(char *string, intmax_t start, intmax_t end);
+char *iCropS(char **string, intmax_t start, intmax_t end);
+char cropElemS(char *string, intmax_t index);
+char iCropElemS(char **string, intmax_t index);
char *insertS(const char *string, intmax_t index, const char *toInsert);
char *insertNFreeS(const char *string, intmax_t index, char *toInsert);
char *iInsertS(char **string, intmax_t index, const char *toInsert);
@@ -633,7 +640,9 @@ char **listAddS(char **list1, char **list2);
char **listSliceS(char **list, intmax_t start, intmax_t end);
char **iListCopyS(char **list, intmax_t start, intmax_t end);
char **iListSliceS(char ***list, intmax_t start, intmax_t end);
+char **listCropS(char **list, intmax_t start, intmax_t end);
char **iListCropS(char ***list, intmax_t start, intmax_t end);
+char *listCropElemS(char **list, intmax_t index);
char *iListCropElemS(char ***list, intmax_t index);
char **listInsertS(char **list, intmax_t index, char **toInsert);
char **iListInsertS(char ***list, intmax_t index, char **toInsert);
@@ -930,6 +939,8 @@ static int _log_current_mode = LOG_DATE;
static bool _log_verbose_short_path = true;
+static bool _logToStdout = true;
+
// logging file 0 is stdout
static uint16_t _current_log_file = 1;
@@ -1087,6 +1098,48 @@ void setLogShortPath(bool shortPath) {
}
/**
+ * get stdout state, when TRUE (default) all logs are printed to stdout
+ */
+bool getLogStdout(void) {
+
+ return(_logToStdout);
+}
+
+/**
+ * enable/disable printing logs to stdout
+ *
+ * TRUE: print logs to stdout
+ * FALSE: print logs to files only
+ */
+void setLogStdout(bool state) {
+
+ _logToStdout = state;
+}
+
+/**
+ * log to a file named progName.log
+ */
+bool openProgLogFile(void) {
+
+ if (!progName) {
+ logME(libsheepyErrorMask, "Program name is not set, call initLibsheepy or set prog name with setProgName");
+ return(false);
+ }
+
+ char *s = formatS("%s.log", progName);;
+
+ if (!setLogFile(s)) {
+ logME(libsheepyErrorMask, "Couldn't open log file: %s", s);
+ free(s);
+ return(false);
+ }
+
+ free(s);
+ return(true);
+}
+
+
+/**
* print logging levels
* logs messages to all log file
*
@@ -1102,6 +1155,11 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
va_list args;
char buffer[lenS(msg) + MAX_MSG_LEN];
+ if (_current_log_file == 1 && !_logToStdout) {
+ // log to stdout is disable and there are no log files
+ return;
+ }
+
if (loglevel > logMaxLevel) {
// skip log above logMaxLevel
return;
@@ -1198,8 +1256,9 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
}
// print the log tag
+ int firstLogFile = _logToStdout ? 0 : 1;
int i;
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s", log_tags[tagSymbols][loglevel]);
}
@@ -1210,27 +1269,27 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
switch(_log_current_mode) {
case LOG_VERBOSE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s() (%s:%d) at %s |\t", func, file, line, clock);
}
break;
case LOG_FUNC:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s %d: ", func, line);
}
break;
case LOG_PROG:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s: ", progName);
}
break;
case LOG_PROGNDATE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s %s: ", progName, clock);
}
break;
case LOG_DATE:
- for (i=0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s ", clock);
}
break;
@@ -1240,20 +1299,20 @@ void _pLog(int loglevel, const char *file, const char *func, int line, const cha
// print the first line
if (buffer[0] == 0) {
// empty or NULL msg, print empty line
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "\n");
}
}
else {
char *toLog = strtok(buffer, "\n");
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s\n", toLog);
}
// for these next lines, add a pipe and tab once.
toLog = strtok(NULL, "\n");
while (toLog) {
- for (i = 0; i < _current_log_file; i++) {
+ for (i=firstLogFile; i < _current_log_file; i++) {
fprintf(_logging_files[i], "%s\n", toLog);
}
toLog = strtok(NULL, "\n");
@@ -1678,7 +1737,7 @@ int systemNFreeF(char *command, int line, const char *thisFunc, const char *this
r = system(command);
if (r) {
- logE("\nSystem Error at %d, %s, %s. The command was: \"%s\"\n", line, thisFunc, thisFileName, command);
+ logME(libsheepyErrorMask, "\nSystem Error at %d, %s, %s. The command was: \"%s\"\n", line, thisFunc, thisFileName, command);
}
free(command);
return(r);
@@ -2190,7 +2249,7 @@ char *expandHome(const char* path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2380,7 +2439,7 @@ char *iExpandHome(char **path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2564,7 +2623,7 @@ char *bExpandHome(char *path) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -2741,7 +2800,7 @@ char *bLExpandHome(char *path, size_t pathSize) {
// sizeof(user)-1 to keep a char tp append final ':'
if (getlogin_r(user, sizeof(user)-1)) {
// error
- logE("getlogin for current user");
+ logME(libsheepyErrorMask, "getlogin for current user");
} {
pathStart = 1;
}
@@ -6832,7 +6891,8 @@ char *bLFormatS(char *string, size_t stringSize, const char *fmt, ...) {
* string2 string to append at the end of string1
* \return
* new string string1+string2 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string1 when string2 is NULL (you must free the pointer)
+ * NULL when string1 is NULL
*/
char *appendS(const char *string1, const char *string2) {
char *r = NULL;
@@ -6950,17 +7010,20 @@ char *appendSChar(char c, const char *string2) {
* string2 string to append at the end of string1
* \return
* string1 modified string1 (realloc), string1+string2 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 no change when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iAppendS(char **string1, const char *string2) {
char *tmp = NULL;
size_t l1;
size_t l2;
- if (!string1 || !string2) {
+ if (!string1) {
return(NULL);
}
-
+ if (!string2) {
+ return(*string1);
+ }
if (!*string1) {
*string1 = strdup(string2);
return(*string1);
@@ -7173,7 +7236,8 @@ char *bLAppendManySF(char *string, size_t stringSize, const char *paramType, ...
* string2 string to prepend at the beginning of string1
* \return
* new string string2+string1 (you must free the pointer)
- * NULL when string1 or string2 are NULL
+ * dup string2 when string1 is NULL (you must free the pointer)
+ * NULL when string2 is NULL
*/
char *prependS(const char *string1, const char *string2) {
@@ -7217,16 +7281,19 @@ char *prependSChar(char c, const char *string2) {
* string1 string, which is reallocated.
* string2 string to prepend at the beginning of string1
* \return
- * string1 modified string1, string2+string1 (you must free the pointer)
- * NULL no change when string1 or string2 are NULL
+ * string1 modified string1, string2+string1 (you must free the pointer)
+ * string1 when string2 is NULL (you must free the pointer)
+ * NULL no change when string1 is NULL
*/
char *iPrependS(char **string1, const char *string2) {
size_t l2;
- if (!string1 || !string2) {
+ if (!string1) {
return(NULL);
}
-
+ if (!string2) {
+ return(*string1);
+ }
if (!*string1) {
*string1 = strdup(string2);
return(*string1);
@@ -12780,6 +12847,179 @@ char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end) {
}
/**
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *cropS(char *string, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!string) {
+ return(NULL);
+ }
+
+ len = strlen(string);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ strLCpy(l, (n+1) * sizeof(char), string+start);
+ strLCpy(string+start, len-end+1, string+end);
+ }
+
+ return(l);
+}
+
+/**
+ * Crop String
+ * return a new string with characters from start and end in string
+ * and delete characters from start to end in the original string
+ * negative indexes are allowed
+ *
+ * \param
+ * string
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced string (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *iCropS(char **string, intmax_t start, intmax_t end) {
+ char *l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!string || !*string) {
+ return(NULL);
+ }
+
+ len = strlen(*string);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char));
+ if (!l) {
+ return(NULL);
+ }
+ strLCpy(l, (n+1) * sizeof(char), *string+start);
+ strLCpy(*string+start, len-end+1, *string+end);
+ }
+
+ return(l);
+}
+
+char cropElemS(char *string, intmax_t index) {
+ intmax_t len;
+
+ if (!string) {
+ return(0);
+ }
+
+ len = strlen(string);
+ if (index >= len) {
+ return(0);
+ }
+ if (index < -len) {
+ return(0);
+ }
+ if (index < 0) {
+ index = len + index;
+ }
+
+ char r = *(string+index);
+
+ if (index == len-1) {
+ string[len-1] = 0;
+ }
+ else {
+ strLCpy(string+index, len-1, string+index+1);
+ }
+
+ return(r);
+}
+
+char iCropElemS(char **string, intmax_t index) {
+
+ if (!string) {
+ return(0);
+ }
+
+ return(cropElemS(*string, index));
+}
+
+/**
* insert string in string at index
*
* return new string with toInsert at index
@@ -12802,7 +13042,10 @@ char *insertS(const char *string, intmax_t index, const char *toInsert) {
// sanity checks
if (!string) {
- return(NULL);
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(strdup(toInsert));
}
if (!toInsert || isEmptyS(toInsert)) {
return(strdup(string));
@@ -12846,7 +13089,7 @@ char *insertS(const char *string, intmax_t index, const char *toInsert) {
}
/**
- * insert string in string at index and free toInsert
+ * insert string in string at index and free toInsert when successful
*
* return new string with toInsert at index
* negative indexes are allowed
@@ -12868,12 +13111,15 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
// sanity checks
if (!string) {
+ if (index) {
+ return(NULL);
+ }
+ if (!toInsert) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- free(toInsert);
- return(strdup(string));
+ return(r);
}
len = strlen(string);
@@ -12887,14 +13133,12 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -12902,6 +13146,11 @@ char *insertNFreeS(const char *string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, string);
@@ -12939,11 +13188,16 @@ char *iInsertS(char **string, intmax_t index, const char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
+ *string = r;
+ return(r);
}
len = strlen(*string);
@@ -12971,6 +13225,10 @@ char *iInsertS(char **string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -13009,13 +13267,17 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
- free(toInsert);
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
+ *string = r;
+ return(r);
}
len = strlen(*string);
@@ -13030,14 +13292,12 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -13045,6 +13305,11 @@ char *iInsertNFreeS(char **string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -13086,10 +13351,6 @@ char *bInsertS(char *string, intmax_t index, const char *toInsert) {
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
-
len = strlen(string);
if (!len && index == -1) {
@@ -13115,6 +13376,10 @@ char *bInsertS(char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -13155,9 +13420,6 @@ char *bLInsertS(char *string, size_t stringSize, intmax_t index, const char *toI
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
if (!stringSize) {
// string size is 0 - no change
@@ -13189,6 +13451,10 @@ char *bLInsertS(char *string, size_t stringSize, intmax_t index, const char *toI
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -13228,7 +13494,11 @@ char *injectS(const char *string, intmax_t index, char toInject) {
// sanity checks
if (!string) {
- return(NULL);
+ if (index) {
+ return(NULL);
+ }
+ charToS(inject, toInject);
+ return(strdup(inject));
}
len = strlen(string);
@@ -13293,9 +13563,17 @@ char *iInjectS(char **string, intmax_t index, char toInject) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ charToS(inject, toInject);
+ *string = strdup(inject);
+ return(*string);
+ }
len = strlen(*string);
@@ -46962,10 +47240,10 @@ char *insertUTF8(const char *string, intmax_t index, const char *toInsert) {
// sanity checks
if (!string) {
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- return(strdup(string));
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(strdup(toInsert));
}
len = lenUTF8(string);
@@ -46993,6 +47271,10 @@ char *insertUTF8(const char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
return(catS(toInsert, string));
@@ -47031,12 +47313,15 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
// sanity checks
if (!string) {
+ if (index) {
+ return(NULL);
+ }
+ if (!toInsert) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
- }
- if (!toInsert || isEmptyS(toInsert)) {
- free(toInsert);
- return(strdup(string));
+ return(r);
}
len = lenUTF8(string);
@@ -47051,14 +47336,12 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -47066,6 +47349,11 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(strdup(string));
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, string);
@@ -47080,8 +47368,6 @@ char *insertNFreeUTF8(const char *string, intmax_t index, char *toInsert) {
freeManyS(s1,s2, toInsert);
return(r);
-
- return(NULL);
}
@@ -47107,11 +47393,16 @@ char *iInsertUTF8(char **string, intmax_t index, const char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
+ *string = r;
+ return(r);
}
len = lenUTF8(*string);
@@ -47139,6 +47430,10 @@ char *iInsertUTF8(char **string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -47179,13 +47474,17 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
intmax_t len;
// sanity checks
- if (!string || !*string) {
- free(toInsert);
+ if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
+ if (!*string) {
+ if (index) {
+ return(NULL);
+ }
+ r = strdup(toInsert);
free(toInsert);
- return(NULL);
+ *string = r;
+ return(r);
}
len = lenUTF8(*string);
@@ -47200,14 +47499,12 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
}
if (index > len) {
- free(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- free(toInsert);
return(NULL);
}
if (neg) {
@@ -47215,6 +47512,11 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ free(toInsert);
+ return(*string);
+ }
+
if (index == 0) {
// insert at beginning
r = catS(toInsert, *string);
@@ -47231,8 +47533,6 @@ char *iInsertNFreeUTF8(char **string, intmax_t index, char *toInsert) {
free(*string);
*string = r;
return(r);
-
- return(NULL);
}
@@ -47260,9 +47560,6 @@ char *bInsertUTF8(char *string, intmax_t index, const char *toInsert) {
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
len = lenUTF8(string);
@@ -47289,6 +47586,10 @@ char *bInsertUTF8(char *string, intmax_t index, const char *toInsert) {
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -47331,9 +47632,6 @@ char *bLInsertUTF8(char *string, size_t stringSize, intmax_t index, const char *
if (!string) {
return(NULL);
}
- if (!toInsert || isEmptyS(toInsert)) {
- return(NULL);
- }
if (!stringSize) {
// string size is 0 - no change
@@ -47365,6 +47663,10 @@ char *bLInsertUTF8(char *string, size_t stringSize, intmax_t index, const char *
}
+ if (!toInsert || isEmptyS(toInsert)) {
+ return(string);
+ }
+
if (index == 0) {
// insert at beginning
char *s = alloca(len+1);;
@@ -48412,18 +48714,13 @@ char **listFromArrayS(char **array, size_t size) {
char **listPushS(char ***list, const char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = strdup(s);
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = strdup(s);
(*list)[1] = NULL;
}
else {
@@ -48437,15 +48734,9 @@ char **listPushS(char ***list, const char *s) {
else {
*list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = strdup(s);
+ (*list)[len] = strdup(s);
}
}
- }
return(*list);
}
@@ -48475,18 +48766,13 @@ char **listPushCharS(char ***list, char c) {
char **iListPushS(char ***list, char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
@@ -48500,15 +48786,9 @@ char **iListPushS(char ***list, char *s) {
else {
*list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = s;
+ (*list)[len] = s;
}
}
- }
return(*list);
}
@@ -48565,27 +48845,17 @@ char *listPopS(char ***list) {
char **listPrependS(char ***list, const char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = strdup(s);
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = strdup(s);
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
- // realloc list and copy s to last element
+ // realloc list and copy s to first element
uint64_t len;
len = listLengthS(*list);
char **tmp = REALLOC(*list, (len+2) * sizeof(char *));
@@ -48631,27 +48901,17 @@ char **listPrependCharS(char ***list, char c) {
char **iListPrependS(char ***list, char *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(char *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(char *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
- // realloc list and copy s to last element
+ // realloc list and copy s to first element
uint64_t len;
len = listLengthS(*list);
char **tmp = REALLOC(*list, (len+2) * sizeof(char *));
@@ -50274,7 +50534,84 @@ char **iListSliceS(char ***list, intmax_t start, intmax_t end) {
* string pointers are copied to the sliced list
*
* \param
- * list (this parameter is reallocated)
+ * list
+ * \param
+ * start index, must be in the list
+ * \param
+ * end index, must be in the list
+ * \return
+ * new sliced list (you must free the pointer with listFreeS or free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char **listCropS(char **list, intmax_t start, intmax_t end) {
+ char **l = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!list) {
+ return(NULL);
+ }
+
+ len = listLengthS(list);
+
+ if (start > len) {
+ return(NULL);
+ }
+ if (end > len) {
+ end = len;
+ }
+ if (start <= -len) {
+ start = -len;
+ }
+ if (end <= -len) {
+ return(NULL);
+ }
+ if (start < 0) {
+ start = len + start;
+ }
+ if (end <= 0) {
+ end = len + end;
+ }
+ if (end < start) {
+ return(NULL);
+ }
+
+ if (start < end) {
+ // start < end < len
+ intmax_t n;
+ n = end - start;
+ l = MALLOC((n+1) * sizeof(char *));
+ if (!l) {
+ return(NULL);
+ }
+ for (intmax_t i=0;i < n;i++) {
+ l[i] = *(list+start+i);
+ }
+ l[n] = NULL;
+ // free end < len
+ for (intmax_t i=0;i < (len - end);i++) {
+ list[i+start] = *(list+i+end);
+ }
+ list[len-n] = NULL;
+ }
+
+ return(l);
+}
+
+/**
+ * list Crop String
+ * return a new list with elements from start and end in list
+ * and delete elements from start to end in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelS because only the
+ * string pointers are copied to the sliced list
+ *
+ * \param
+ * list
* \param
* start index, must be in the list
* \param
@@ -50288,7 +50625,6 @@ char **iListSliceS(char ***list, intmax_t start, intmax_t end) {
*/
char **iListCropS(char ***list, intmax_t start, intmax_t end) {
char **l = NULL;
- char **input = NULL;
intmax_t len;
// sanity checks
@@ -50299,8 +50635,6 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
len = listLengthS(*list);
if (start > len) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
if (end > len) {
@@ -50310,8 +50644,6 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
start = -len;
}
if (end <= -len) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
if (start < 0) {
@@ -50321,18 +50653,10 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
end = len + end;
}
if (end < start) {
- listFreeS(*list);
- listEmptyS(*list);
return(NULL);
}
- if (start == end) {
- // empty list
- listEmptyS(l);
- // free elements
- listFreeS(*list);
- }
- else {
+ if (start < end) {
// start < end < len
intmax_t n;
n = end - start;
@@ -50340,27 +50664,17 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
if (!l) {
return(NULL);
}
- input = MALLOC((len-n+1) * sizeof(char *));
- if (!input) {
- return(NULL);
- }
for (intmax_t i=0;i < n;i++) {
l[i] = *((*list)+start+i);
}
l[n] = NULL;
- // free 0 < start
- for (intmax_t i=0;i < start;i++) {
- input[i] = *((*list)+i);
- }
// free end < len
for (intmax_t i=0;i < (len - end);i++) {
- input[i+start] = *((*list)+i+end);
+ (*list)[i+start] = *((*list)+i+end);
}
- input[len-n] = NULL;
- free(*list);
+ (*list)[len-n] = NULL;
}
- *list = input;
return(l);
}
@@ -50374,7 +50688,7 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
* string pointer is returned directly
*
* \param
- * list (this parameter is reallocated)
+ * list
* \param
* index must be in the list
* \return
@@ -50384,17 +50698,16 @@ char **iListCropS(char ***list, intmax_t start, intmax_t end) {
* unchanged when list is NULL or when start and end are not set correctly
* NULL error
*/
-char *iListCropElemS(char ***list, intmax_t index) {
- char **l = NULL;
+char *listCropElemS(char **list, intmax_t index) {
char *r = NULL;
intmax_t len;
// sanity checks
- if (!list || !*list) {
+ if (!list) {
return(NULL);
}
- len = listLengthS(*list);
+ len = listLengthS(list);
if (len == 0) {
return(NULL);
@@ -50410,21 +50723,66 @@ char *iListCropElemS(char ***list, intmax_t index) {
index = len + index;
}
- l = MALLOC((len-1+1) * sizeof(char *));
- if (!l) {
+ r = *(list+index);
+ for (intmax_t i=index ; i < len-1 ; i++) {
+ list[i] = *(list+1+i);
+ }
+ list[len-1] = NULL;
+
+ return(r);
+}
+
+/**
+ * list Crop Element String
+ * return element at index
+ * and delete element at index in the original list
+ * negative indexes are allowed
+ *
+ * iListCropS is faster than listSliceS+iListDelElemS because only the
+ * string pointer is returned directly
+ *
+ * \param
+ * list
+ * \param
+ * index must be in the list
+ * \return
+ * element at index (you must free the pointer with free)
+ * empty list when start=end
+ * unchanged when list is empty
+ * unchanged when list is NULL or when start and end are not set correctly
+ * NULL error
+ */
+char *iListCropElemS(char ***list, intmax_t index) {
+ char *r = NULL;
+ intmax_t len;
+
+ // sanity checks
+ if (!list || !*list) {
return(NULL);
}
- for (intmax_t i=0;i < index;i++) {
- l[i] = *((*list)+i);
+
+ len = listLengthS(*list);
+
+ if (len == 0) {
+ return(NULL);
}
+
+ if (index >= len) {
+ return(NULL);
+ }
+ if (index < -len) {
+ return(NULL);
+ }
+ if (index < 0) {
+ index = len + index;
+ }
+
r = *((*list)+index);
for (intmax_t i=index ; i < len-1 ; i++) {
- l[i] = *((*list)+1+i);
+ (*list)[i] = *((*list)+1+i);
}
- l[len-1] = NULL;
+ (*list)[len-1] = NULL;
- free(*list);
- *list = l;
return(r);
}
@@ -50453,12 +50811,11 @@ char **listInsertS(char **list, intmax_t index, char **toInsert) {
//sanity checks
if (!list) {
- return(NULL);
- }
- if (!toInsert || listIsEmptyS(toInsert)) {
- return(listDupS(list));
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(listDupS(toInsert));
}
-
len = listLengthS(list);
if (!len && index == -1) {
@@ -50484,6 +50841,10 @@ char **listInsertS(char **list, intmax_t index, char **toInsert) {
}
+ if (!toInsert || listIsEmptyS(toInsert)) {
+ return(listDupS(list));
+ }
+
if (index == 0) {
// insert at beginning
return(listAddS(toInsert, list));
@@ -50523,11 +50884,16 @@ char **iListInsertS(char ***list, intmax_t index, char **toInsert) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (!toInsert || listIsEmptyS(toInsert)) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDupS(toInsert);
+ *list = r;
+ return(r);
}
len = listLengthS(*list);
@@ -50555,6 +50921,10 @@ char **iListInsertS(char ***list, intmax_t index, char **toInsert) {
}
+ if (listIsEmptyS(toInsert)) {
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
iListAppendS(&r, toInsert);
@@ -50599,16 +50969,17 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
intmax_t len;
//sanity checks
- if (!toInsert) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (listIsEmptyS(toInsert)) {
- listFreeS(toInsert);
- return(NULL);
- }
- if (!list || !*list) {
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDupS(toInsert);
listFreeS(toInsert);
- return(NULL);
+ *list = r;
+ return(r);
}
len = listLengthS(*list);
@@ -50623,14 +50994,12 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
}
if (index > len) {
- listFreeS(toInsert);
return(NULL);
}
if (neg) {
index++;
}
if (index < -len) {
- listFreeS(toInsert);
return(NULL);
}
if (neg) {
@@ -50638,6 +51007,11 @@ char **iListInsertNFreeS(char ***list, intmax_t index, char **toInsert) {
}
+ if (listIsEmptyS(toInsert)) {
+ listFreeS(toInsert);
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
iListAppendS(&r, toInsert);
@@ -50683,10 +51057,15 @@ char **listInjectS(char **list, intmax_t index, char *toInject) {
//sanity checks
if (!list) {
- return(NULL);
+ if (index || !toInject) {
+ return(NULL);
+ }
+ listPushS(&r, toInject);
+ return(r);
}
+
if (!toInject) {
- return(listDupS(list));
+ return(NULL);
}
len = listLengthS(list);
@@ -50762,11 +51141,15 @@ char **iListInjectS(char ***list, intmax_t index, char *toInject) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInject) {
return(NULL);
}
- if (!toInject) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ listPushS(list, toInject);
+ return(*list);
}
len = listLengthS(*list);
@@ -51884,9 +52267,15 @@ char **listUniqS(char **list) {
return(NULL);
}
+ size_t len = listLengthS(list);
+
+ if (!len) {
+ listEmptyS(r);
+ return(r);
+ }
listPushS(&r, list[0]);
// one element list
- if (listLengthS(list) == 1) {
+ if (len == 1) {
return(r);
}
// push element to new list if it is not already in new list
@@ -51918,7 +52307,12 @@ char **iListUniqS(char ***list) {
return(NULL);
}
- if (listLengthS(*list) < 2) {
+ size_t len = listLengthS(*list);
+
+ if (!len) {
+ listEmptyS(r);
+ }
+ else if (len == 1) {
// one element list
iListPushS(&r, (*list)[0]);
}
@@ -52577,18 +52971,13 @@ void **listFromArray(void **array, size_t size) {
void **listPush(void ***list, void *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(void *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(void *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
@@ -52600,17 +52989,11 @@ void **listPush(void ***list, void *s) {
return(NULL);
}
else {
- *list = tmp;
+ *list = tmp;
(*list)[len+1] = NULL;
- if (!s) {
- // s is NULL, add NULL in list
- (*list)[len] = NULL;
- }
- else {
- (*list)[len] = s;
+ (*list)[len] = s;
}
}
- }
return(*list);
}
@@ -52669,26 +53052,16 @@ void *listPop(void ***list) {
void **listPrepend(void ***list, void *s) {
// sanity checks
- if (!list) {
+ if (!list || !s) {
return(NULL);
}
if (!*list) {
- *list = MALLOC(2 * sizeof(void *));
- if (!s) {
- (*list)[0] = NULL;
- }
- else {
- (*list)[0] = s;
- }
+ *list = MALLOC(2 * sizeof(void *));
+ (*list)[0] = s;
(*list)[1] = NULL;
}
else {
- if (!s) {
- // we dont want to insert NULL at position 0
- return(NULL);
- }
-
// realloc list and copy s to last element
uint64_t len;
len = listLength(*list);
@@ -52869,7 +53242,7 @@ void **listSet(void **list, intmax_t index, void *s) {
intmax_t len;
// sanity checks
- if (!list || !s) {
+ if (!list) {
return(NULL);
}
@@ -52884,6 +53257,10 @@ void **listSet(void **list, intmax_t index, void *s) {
index = len + index;
}
+ if (!s) {
+ return(list);
+ }
+
list[index] = s;
return(list);
}
@@ -53320,10 +53697,14 @@ void **listInsert(void **list, intmax_t index, void **toInsert) {
//sanity checks
if (!list) {
- return(NULL);
+ if (index || !toInsert) {
+ return(NULL);
+ }
+ return(listDup(toInsert));
}
- if (!toInsert || listIsEmpty(toInsert)) {
- return(listDup(list));
+
+ if (!toInsert) {
+ return(NULL);
}
len = listLength(list);
@@ -53351,6 +53732,10 @@ void **listInsert(void **list, intmax_t index, void **toInsert) {
}
+ if (listIsEmpty(toInsert)) {
+ return(listDup(list));
+ }
+
if (index == 0) {
// insert at beginning
return(listAdd(toInsert, list));
@@ -53391,11 +53776,16 @@ void **iListInsert(void ***list, intmax_t index, void **toInsert) {
intmax_t len;
//sanity checks
- if (!list || !*list) {
+ if (!list || !toInsert) {
return(NULL);
}
- if (!toInsert || listIsEmpty(toInsert)) {
- return(NULL);
+ if (!*list) {
+ if (index) {
+ return(NULL);
+ }
+ r = listDup(toInsert);
+ *list = r;
+ return(r);
}
len = listLength(*list);
@@ -53423,6 +53813,10 @@ void **iListInsert(void ***list, intmax_t index, void **toInsert) {
}
+ if (listIsEmpty(toInsert)) {
+ return(*list);
+ }
+
if (index == 0) {
// insert at beginning
listAppend(&r, toInsert);
@@ -54436,6 +54830,20 @@ int MAIN(int ARGC, char** ARGV) {
/* f32 x = 0 */
/* f64 p = 0 */
+
+ char *toBCroped = strdup("123456");
+ char *crp = iCropS(&toBCroped, -1, 1);
+ logVar(toBCroped, "s");
+ logVar(crp, "s");
+
+ char **lst = listCreateS("1","2","3","4","5");
+ char **lcrop = listCropS(lst, 1,3);
+ listPrintS(lst);
+ AT
+ listPrintS(lcrop);
+
+ setLogStdout(no);
+
logExit(EXIT_SUCCESS, "qweqwe");
logXSuccess("qweqwe");
logXFailure("qweqwe");
diff --git a/src/libsheepy.h b/src/libsheepy.h
@@ -88,15 +88,15 @@
*
* Error from any function returning a status have 0, false or NULL for value
* (or specifed otherwise in the function description).
+ * Errors are reported when the parameters are NULL or invalid, when it happens no parameters and no data stuctures are freed or changed.
* Errors are detected with if (!func)
*
* For more information, the documentation is located at http://spartatek.se/libsheepy/
*/
-
// version accoring to the version package: Release.Major.minor.patch
// https://noulin.net/version/file/README.md.html
-#define LIBSHEEPY_VERSION "1.0.9.1"
+#define LIBSHEEPY_VERSION "1.1.0"
#ifndef SH_PREFIX
#define SH_PREFIX(NAME) NAME
@@ -921,6 +921,15 @@ bool getLogShortPath(void);
// set log long/short file path value for VERBOSE mode
void setLogShortPath(bool shortPath);
+// get stdout state, when TRUE (default) all logs are printed to stdout
+bool getLogStdout(void);
+
+// enable/disable printing logs to stdout
+void setLogStdout(bool state);
+
+// log to a file named progName.log
+bool openProgLogFile(void);
+
/**
* print logging levels
*
@@ -1961,6 +1970,12 @@ char *iSliceS(char **string, intmax_t start, intmax_t end);
char *bSliceS(char *string, intmax_t start, intmax_t end);
char *bLSliceS(char *string, size_t stringSize, intmax_t start, intmax_t end);
+// crop string (slice+del)
+char *cropS(char *string, intmax_t start, intmax_t end);
+char *iCropS(char **string, intmax_t start, intmax_t end);
+char cropElemS(char *string, intmax_t index);
+char iCropElemS(char **string, intmax_t index);
+
// insert string in string
char *insertS(const char *string, intmax_t index, const char *toInsert);
char *insertNFreeS(const char *string, intmax_t index, char *toInsert);
@@ -2423,7 +2438,9 @@ char **iListCopyS(char **list, intmax_t start, intmax_t end);
char **iListSliceS(char ***list, intmax_t start, intmax_t end);
// crop list (slice+del)
+char **listCropS(char **list, intmax_t start, intmax_t end);
char **iListCropS(char ***list, intmax_t start, intmax_t end);
+char *listCropElemS(char **list, intmax_t index);
char *iListCropElemS(char ***list, intmax_t index);
// insert list in list
@@ -2741,14 +2758,14 @@ bool appendText(const char *filePath, char **list);
// execOut
char **execOut(const char *cmd);
// convenience define
-#define systemOut execOut
+#define execOutf systemOutf
+#define execf systemf
// system command with formatting
char **systemOutf(const char *fmt, ...);
// convenience define
-#define execOutf systemOutf
+#define systemOut execOut
int systemf(const char *fmt, ...);
-#define execf systemf
// system commands and log
#define logSystem(cmd) do{\
@@ -2780,6 +2797,7 @@ int commandfF(int line, const char *thisFunc, const char *thisFileName, const ch
#define commandNFree(cmd) commandNFreeF(cmd, __LINE__, __func__, __FILE__)
int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFileName);
#define commandOut execOut
+#define commandOutf systemOutf
// log then run command and return exit code from command (not system return value like system, systemf and systemNFree)
#define logCommand(cmd) funcbegin\
@@ -2800,6 +2818,7 @@ int commandNFreeF(char *cmd, int line, const char *thisFunc, const char *thisFil
funcend
#define logCommandOut logExecOut
+#define logCommandOutf logExecOutf
// compare lists
bool listEqS(char **list1, char **list2);
@@ -7212,7 +7231,7 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
*
* typeName bits;
*
- * staticBitsetClear(&bits);
+ * staticBitsetInit(&bits);
*
* staticBitset1(&bits, index);
*
@@ -7233,6 +7252,8 @@ bool fiberPrepend(void *ctx, int thisSlot, fiberFT func);
#define staticBitsetT(typeName, containerType, count)\
typedef struct {containerType map[BUCKETS(count, 8 * sizeof(containerType))];} typeName;
+#define staticBitsetInit staticBitsetClear
+
/** bitset count */
#define staticBitsetCount(name) (sizeof((name)->map) * 8)
diff --git a/src/libsheepyObject.h b/src/libsheepyObject.h
@@ -163,7 +163,12 @@ static const bool checkObjectTypes = true;
/**
* free buffers in obj
*/
-#define freeO(obj) (obj)->f->free(obj)
+#define freeO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->free(p);\
+ })
+
#define freeG(self) _Generic((self), \
smallArrayt*: freeSmallArrayG, \
smallBoolt*: freeSmallBoolG, \
@@ -189,7 +194,11 @@ void freeManyOF(void *paramType, ...);
/**
* free buffers and obj itself
*/
-#define terminateO(obj) if (obj) {(obj)->f->terminate(&(obj));}
+#define terminateO(obj) MACRO (\
+ var p = obj;\
+ if (p) {\
+ p->f->terminate(&(obj));\
+ })
#define terminateG terminateO
/**
@@ -288,7 +297,11 @@ void terminateManyOF(void *paramType, ...);
/**
* free object and keep data
*/
-#define smashO(obj) (obj)->f->smash(&obj)
+#define smashO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->smash(&obj);\
+ })
#define smashG smashO
/**
@@ -300,7 +313,11 @@ void smashManyOF(void *paramType, ...);
/**
* free container only
*/
-#define finishO(obj) if (obj) {(obj)->f->finish(&(obj));}
+#define finishO(obj) MACRO(\
+ var p = obj;\
+ if (p) {\
+ p->f->finish(&(obj));\
+ })
#define finishG finishO
/**
@@ -408,7 +425,7 @@ void finishManyOF(void *paramType, ...);
#define setTopO(self, value) (self)->f->setTop(self, value)
-#define setFromO (self)->f->set(self, value)
+#define setFromO(self, value) (self)->f->set(self, value)
#define setFromG setTopG
#define setTopG(self, value) _Generic((self), \
smallArrayt*: _Generic(value, \
@@ -3237,12 +3254,14 @@ void finishManyOF(void *paramType, ...);
const char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
), \
char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
) \
)(self, path)
@@ -3285,16 +3304,44 @@ void finishManyOF(void *paramType, ...);
const char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
), \
char *: _Generic(path, \
char *: writeFileFromG, \
const char *: writeFileFromG, \
- FILE *: writeStreamFromG \
+ FILE *: writeStreamFromG, \
+ default: writeFileFromG \
) \
)(self, path)
-//TODO #define appendFileG(self, path) _Generic((self),
+#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
+#define appendFileG(self, path) _Generic((self), \
+ smallArrayt *: _Generic(path, \
+ char *: appendTextSmallArrayG, \
+ const char *: appendTextSmallArrayG, \
+ smallStringt *: appendTextSmallStringSmallArrayG, \
+ default: appendTextSmallArrayG), \
+ smallBytest *: _Generic(path, \
+ char *: appendFileSmallBytesG, \
+ const char *: appendFileSmallBytesG, \
+ smallStringt *: appendFileSmallStringSmallBytesG, \
+ default: appendFileSmallBytesG), \
+ smallDictt *: _Generic(path, \
+ char *: appendFileSmallDictG, \
+ const char *: appendFileSmallDictG, \
+ smallStringt *: appendFileSmallStringSmallDictG, \
+ default: appendFileSmallDictG), \
+ smallJsont *: _Generic(path, \
+ char *: appendFileSmallJsonG, \
+ const char *: appendFileSmallJsonG, \
+ smallStringt *: appendFileSmallStringSmallJsonG, \
+ smallJsont *: appendFileJsonSmallJsonG), \
+ char *: appendFileSG, \
+ const char *: appendFileSG, \
+ char **: appendTextSG, \
+ const char **: appendTextCG \
+ )(self, path)
//TODO typeStringSmallArray rtChar rtSmallStringt
//TODO typeStringsSmallArray
@@ -4980,6 +5027,311 @@ void finishManyOF(void *paramType, ...);
smallStringt *: sliceSmallStringG \
)(self, start, end)
+
+#define cropO(self, start, end) (self)->f->crop(self, start, end)
+#define cropG(self, start, end) _Generic((self), \
+ char *: cropS, \
+ char **: listCropS, \
+ char ***: iListCropS, \
+ smallArrayt *: cropSmallArrayG, \
+ smallJsont *: cropSmallJsonG, \
+ smallStringt *: cropSmallStringG \
+ )(self, start, end)
+
+#define cropElemO(self, index) (self)->f->cropElem(self, index)
+#define cropElemG(self, returnType, index) _Generic((self), \
+ smallDictt*: _Generic(index, \
+ char *: _Generic(returnType, \
+ baset*: cropElemSmallDictG, \
+ undefinedt*: cropElemUndefinedSmallDictG, \
+ bool: cropElemBoolSmallDictG, \
+ double: cropElemDoubleSmallDictG, \
+ int64_t: cropElemIntSmallDictG, \
+ int32_t: cropElemInt32SmallDictG, \
+ uint64_t: cropElemUintSmallDictG, \
+ uint32_t: cropElemUint32SmallDictG, \
+ char*: cropElemSSmallDictG, \
+ smallDictt*: cropElemDictSmallDictG, \
+ smallArrayt*: cropElemArraySmallDictG, \
+ smallBoolt*: cropElemSmallBoolSmallDictG, \
+ smallBytest*: cropElemSmallBytesSmallDictG, \
+ smallDoublet*: cropElemSmallDoubleSmallDictG, \
+ smallIntt*: cropElemSmallIntSmallDictG, \
+ smallJsont*: cropElemSmallJsonSmallDictG, \
+ smallStringt*: cropElemSmallStringSmallDictG, \
+ void*: cropElemVoidSmallDictG, \
+ smallContainert*: cropElemSmallContainerSmallDictG, \
+ default: cropElemSmallDictG), \
+ const char *: _Generic(returnType, \
+ baset*: cropElemSmallDictG, \
+ undefinedt*: cropElemUndefinedSmallDictG, \
+ bool: cropElemBoolSmallDictG, \
+ double: cropElemDoubleSmallDictG, \
+ int64_t: cropElemIntSmallDictG, \
+ int32_t: cropElemInt32SmallDictG, \
+ uint64_t: cropElemUintSmallDictG, \
+ uint32_t: cropElemUint32SmallDictG, \
+ char*: cropElemSSmallDictG, \
+ smallDictt*: cropElemDictSmallDictG, \
+ smallArrayt*: cropElemArraySmallDictG, \
+ smallBoolt*: cropElemSmallBoolSmallDictG, \
+ smallBytest*: cropElemSmallBytesSmallDictG, \
+ smallDoublet*: cropElemSmallDoubleSmallDictG, \
+ smallIntt*: cropElemSmallIntSmallDictG, \
+ smallJsont*: cropElemSmallJsonSmallDictG, \
+ smallStringt*: cropElemSmallStringSmallDictG, \
+ void*: cropElemVoidSmallDictG, \
+ smallContainert*: cropElemSmallContainerSmallDictG, \
+ default: cropElemSmallDictG), \
+ default: cropElemSmallDictG \
+ ), \
+ smallJsont*: _Generic(index, \
+ char *: _Generic(returnType, \
+ baset*: cropElemKeySmallJsonG, \
+ undefinedt*: cropElemKeyUndefinedSmallJsonG, \
+ bool: cropElemKeyBoolSmallJsonG, \
+ double: cropElemKeyDoubleSmallJsonG, \
+ int64_t: cropElemKeyIntSmallJsonG, \
+ int32_t: cropElemKeyInt32SmallJsonG, \
+ uint64_t: cropElemKeyUintSmallJsonG, \
+ uint32_t: cropElemKeyUint32SmallJsonG, \
+ char*: cropElemKeySSmallJsonG, \
+ smallDictt*: cropElemKeyDictSmallJsonG, \
+ smallArrayt*: cropElemKeyArraySmallJsonG, \
+ smallBoolt*: cropElemKeySmallBoolSmallJsonG, \
+ smallBytest*: cropElemKeySmallBytesSmallJsonG, \
+ smallDoublet*: cropElemKeySmallDoubleSmallJsonG, \
+ smallIntt*: cropElemKeySmallIntSmallJsonG, \
+ smallJsont*: cropElemKeySmallJsonSmallJsonG, \
+ smallStringt*: cropElemKeySmallStringSmallJsonG, \
+ void*: cropElemKeyVoidSmallJsonG, \
+ smallContainert*: cropElemKeySmallContainerSmallJsonG, \
+ default: cropElemKeySmallJsonG), \
+ const char *: _Generic(returnType, \
+ baset*: cropElemKeySmallJsonG, \
+ undefinedt*: cropElemKeyUndefinedSmallJsonG, \
+ bool: cropElemKeyBoolSmallJsonG, \
+ double: cropElemKeyDoubleSmallJsonG, \
+ int64_t: cropElemKeyIntSmallJsonG, \
+ int32_t: cropElemKeyInt32SmallJsonG, \
+ uint64_t: cropElemKeyUintSmallJsonG, \
+ uint32_t: cropElemKeyUint32SmallJsonG, \
+ char*: cropElemKeySSmallJsonG, \
+ smallDictt*: cropElemKeyDictSmallJsonG, \
+ smallArrayt*: cropElemKeyArraySmallJsonG, \
+ smallBoolt*: cropElemKeySmallBoolSmallJsonG, \
+ smallBytest*: cropElemKeySmallBytesSmallJsonG, \
+ smallDoublet*: cropElemKeySmallDoubleSmallJsonG, \
+ smallIntt*: cropElemKeySmallIntSmallJsonG, \
+ smallJsont*: cropElemKeySmallJsonSmallJsonG, \
+ smallStringt*: cropElemKeySmallStringSmallJsonG, \
+ void*: cropElemKeyVoidSmallJsonG, \
+ smallContainert*: cropElemKeySmallContainerSmallJsonG, \
+ default: cropElemKeySmallJsonG), \
+ int64_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int32_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int16_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ int8_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint64_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint32_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint16_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ uint8_t: _Generic(returnType, \
+ baset*: cropElemAtSmallJsonG, \
+ undefinedt*: cropElemAtUndefinedSmallJsonG, \
+ bool: cropElemAtBoolSmallJsonG, \
+ double: cropElemAtDoubleSmallJsonG, \
+ int64_t: cropElemAtIntSmallJsonG, \
+ int32_t: cropElemAtInt32SmallJsonG, \
+ uint64_t: cropElemAtUintSmallJsonG, \
+ uint32_t: cropElemAtUint32SmallJsonG, \
+ char*: cropElemAtSSmallJsonG, \
+ smallDictt*: cropElemAtDictSmallJsonG, \
+ smallArrayt*: cropElemAtArraySmallJsonG, \
+ smallBoolt*: cropElemAtSmallBoolSmallJsonG, \
+ smallBytest*: cropElemAtSmallBytesSmallJsonG, \
+ smallDoublet*: cropElemAtSmallDoubleSmallJsonG, \
+ smallIntt*: cropElemAtSmallIntSmallJsonG, \
+ smallJsont*: cropElemAtSmallJsonSmallJsonG, \
+ smallStringt*: cropElemAtSmallStringSmallJsonG, \
+ void*: cropElemAtVoidSmallJsonG, \
+ smallContainert*: cropElemAtSmallContainerSmallJsonG, \
+ default: cropElemAtSmallJsonG), \
+ default: cropElemKeySmallJsonG \
+ ), \
+ smallArrayt*: _Generic(returnType, \
+ baset*: cropElemSmallArrayG, \
+ undefinedt*: cropElemUndefinedSmallArrayG, \
+ bool: cropElemBoolSmallArrayG, \
+ double: cropElemDoubleSmallArrayG, \
+ int64_t: cropElemIntSmallArrayG, \
+ int32_t: cropElemInt32SmallArrayG, \
+ uint64_t: cropElemUintSmallArrayG, \
+ uint32_t: cropElemUint32SmallArrayG, \
+ char*: cropElemSSmallArrayG, \
+ smallDictt*: cropElemDictSmallArrayG, \
+ smallArrayt*: cropElemArraySmallArrayG, \
+ smallBoolt*: cropElemSmallBoolSmallArrayG, \
+ smallBytest*: cropElemSmallBytesSmallArrayG, \
+ smallDoublet*: cropElemSmallDoubleSmallArrayG, \
+ smallIntt*: cropElemSmallIntSmallArrayG, \
+ smallJsont*: cropElemSmallJsonSmallArrayG, \
+ smallStringt*: cropElemSmallStringSmallArrayG, \
+ void*: cropElemVoidSmallArrayG, \
+ smallContainert*: cropElemSmallContainerSmallArrayG, \
+ default: cropElemSmallArrayG), \
+ smallStringt*: cropElemSmallStringG, \
+ char *: cropElemS, \
+ char **: listCropElemS, \
+ char ***: iListCropElemS \
+ )(self, index)
+
+
+#define cropSmallJsonO(self, start, end) (self)->f->cropSmallJson(self, start, end)
+#define cropElemAtSmallJsonO(self, index) (self)->f->cropElemAtSmallJson(self, index)
+#define cropElemKeySmallJsonO(self, key) (self)->f->cropElemKeySmallJson(self, key)
+#define cropSmallStringO(self, start, end) (self)->f->cropSmallString(self, start, end)
+#define cropElemSmallStringO(self, index) (self)->f->cropElemSmallString(self, index)
+
#define copyRngO(self, start, end) (self)->f->copy(self, start, end)
#define copyRngG(self, start, end) _Generic((self), \
char *: sliceS, \
@@ -7030,6 +7382,57 @@ void finishManyOF(void *paramType, ...);
#define appendNSmashArrayO(self, array) (self)->f->appendNSmashArray(self, array)
#define appendNSmashArrayG appendNSmashArrayO
+#define cropElemUndefinedO(self, index) (self)->f->cropElemUndefined(self, index)
+#define cropElemUndefinedG cropElemUndefinedO
+
+#define cropElemBoolO(self, index) (self)->f->cropElemBool(self, index)
+#define cropElemBoolG cropElemBoolO
+
+#define cropElemDoubleO(self, index) (self)->f->cropElemDouble(self, index)
+#define cropElemDoubleG cropElemDoubleO
+
+#define cropElemIntO(self, index) (self)->f->cropElemInt(self, index)
+#define cropElemIntG cropElemIntO
+
+#define cropElemInt32O(self, index) (self)->f->cropElemInt32(self, index)
+#define cropElemInt32G cropElemInt32O
+
+#define cropElemUintO(self, index) (self)->f->cropElemUint(self, index)
+#define cropElemUintG cropElemUintO
+
+#define cropElemUint32O(self, index) (self)->f->cropElemUint32(self, index)
+#define cropElemUint32G cropElemUint32O
+
+#define cropElemSO(self, index) (self)->f->cropElemS(self, index)
+#define cropElemSG cropElemSO
+
+#define cropElemDictO(self, index) (self)->f->cropElemDict(self, index)
+#define cropElemDictG cropElemDictO
+
+#define cropElemArrayO(self, index) (self)->f->cropElemArray(self, index)
+#define cropElemArrayG cropElemArrayO
+
+#define cropElemSmallBoolO(self, index) (self)->f->cropElemSmallBool(self, index)
+#define cropElemSmallBoolG cropElemSmallBoolO
+
+#define cropElemSmallBytesO(self, index) (self)->f->cropElemSmallBytes(self, index)
+#define cropElemSmallBytesG cropElemSmallBytesO
+
+#define cropElemSmallDoubleO(self, index) (self)->f->cropElemSmallDouble(self, index)
+#define cropElemSmallDoubleG cropElemSmallDoubleO
+
+#define cropElemSmallIntO(self, index) (self)->f->cropElemSmallInt(self, index)
+#define cropElemSmallIntG cropElemSmallIntO
+
+#define cropElemSmallJsonO(self, index) (self)->f->cropElemSmallJson(self, index)
+#define cropElemSmallJsonG cropElemSmallJsonO
+
+#define cropElemVoidO(self, index) (self)->f->cropElemVoid(self, index)
+#define cropElemVoidG cropElemVoidO
+
+#define cropElemSmallContainerO(self, index) (self)->f->cropElemSmallContainer(self, index)
+#define cropElemSmallContainerG cropElemSmallContainerO
+
#define injectUndefinedO(self, index) (self)->f->injectUndefined(self, index)
#define injectUndefinedG injectUndefinedO
@@ -7522,9 +7925,6 @@ void finishManyOF(void *paramType, ...);
#define equalSmallStringO(self, p2) (self)->f->equalSmallString(self, p2)
#define equalSmallStringG equalSmallStringO
-#define appendFileO(self, filePath) (self)->f->appendFile(self, filePath)
-#define appendFileG appendFileO
-
#define appendFileSmallStringO(self, filePath) (self)->f->appendFileSmallString(self, filePath)
#define appendFileSmallStringG appendFileSmallStringO
@@ -8125,6 +8525,120 @@ void finishManyOF(void *paramType, ...);
#define addJsonO(self, array) (self)->f->addJson(self, array)
#define addJsonG addJsonO
+#define cropSO(self, start, end) (self)->f->cropS(self, start, end)
+#define cropSG cropSO
+
+#define cropElemAtO(self, index) (self)->f->cropElemAt(self, index)
+#define cropElemAtG cropElemAtO
+
+#define cropElemAtUndefinedO(self, index) (self)->f->cropElemAtUndefined(self, index)
+#define cropElemAtUndefinedG cropElemAtUndefinedO
+
+#define cropElemAtBoolO(self, index) (self)->f->cropElemAtBool(self, index)
+#define cropElemAtBoolG cropElemAtBoolO
+
+#define cropElemAtDoubleO(self, index) (self)->f->cropElemAtDouble(self, index)
+#define cropElemAtDoubleG cropElemAtDoubleO
+
+#define cropElemAtIntO(self, index) (self)->f->cropElemAtInt(self, index)
+#define cropElemAtIntG cropElemAtIntO
+
+#define cropElemAtInt32O(self, index) (self)->f->cropElemAtInt32(self, index)
+#define cropElemAtInt32G cropElemAtInt32O
+
+#define cropElemAtUintO(self, index) (self)->f->cropElemAtUint(self, index)
+#define cropElemAtUintG cropElemAtUintO
+
+#define cropElemAtUint32O(self, index) (self)->f->cropElemAtUint32(self, index)
+#define cropElemAtUint32G cropElemAtUint32O
+
+#define cropElemAtSO(self, index) (self)->f->cropElemAtS(self, index)
+#define cropElemAtSG cropElemAtSO
+
+#define cropElemAtCharO(self, index) (self)->f->cropElemAtChar(self, index)
+#define cropElemAtCharG cropElemAtCharO
+
+#define cropElemAtDictO(self, index) (self)->f->cropElemAtDict(self, index)
+#define cropElemAtDictG cropElemAtDictO
+
+#define cropElemAtArrayO(self, index) (self)->f->cropElemAtArray(self, index)
+#define cropElemAtArrayG cropElemAtArrayO
+
+#define cropElemAtSmallBoolO(self, index) (self)->f->cropElemAtSmallBool(self, index)
+#define cropElemAtSmallBoolG cropElemAtSmallBoolO
+
+#define cropElemAtSmallBytesO(self, index) (self)->f->cropElemAtSmallBytes(self, index)
+#define cropElemAtSmallBytesG cropElemAtSmallBytesO
+
+#define cropElemAtSmallDoubleO(self, index) (self)->f->cropElemAtSmallDouble(self, index)
+#define cropElemAtSmallDoubleG cropElemAtSmallDoubleO
+
+#define cropElemAtSmallIntO(self, index) (self)->f->cropElemAtSmallInt(self, index)
+#define cropElemAtSmallIntG cropElemAtSmallIntO
+
+#define cropElemAtSmallStringO(self, index) (self)->f->cropElemAtSmallString(self, index)
+#define cropElemAtSmallStringG cropElemAtSmallStringO
+
+#define cropElemAtVoidO(self, index) (self)->f->cropElemAtVoid(self, index)
+#define cropElemAtVoidG cropElemAtVoidO
+
+#define cropElemAtSmallContainerO(self, index) (self)->f->cropElemAtSmallContainer(self, index)
+#define cropElemAtSmallContainerG cropElemAtSmallContainerO
+
+#define cropElemKeyO(self, key) (self)->f->cropElemKey(self, key)
+#define cropElemKeyG cropElemKeyO
+
+#define cropElemKeyUndefinedO(self, key) (self)->f->cropElemKeyUndefined(self, key)
+#define cropElemKeyUndefinedG cropElemKeyUndefinedO
+
+#define cropElemKeyBoolO(self, key) (self)->f->cropElemKeyBool(self, key)
+#define cropElemKeyBoolG cropElemKeyBoolO
+
+#define cropElemKeyDoubleO(self, key) (self)->f->cropElemKeyDouble(self, key)
+#define cropElemKeyDoubleG cropElemKeyDoubleO
+
+#define cropElemKeyIntO(self, key) (self)->f->cropElemKeyInt(self, key)
+#define cropElemKeyIntG cropElemKeyIntO
+
+#define cropElemKeyInt32O(self, key) (self)->f->cropElemKeyInt32(self, key)
+#define cropElemKeyInt32G cropElemKeyInt32O
+
+#define cropElemKeyUintO(self, key) (self)->f->cropElemKeyUint(self, key)
+#define cropElemKeyUintG cropElemKeyUintO
+
+#define cropElemKeyUint32O(self, key) (self)->f->cropElemKeyUint32(self, key)
+#define cropElemKeyUint32G cropElemKeyUint32O
+
+#define cropElemKeySO(self, key) (self)->f->cropElemKeyS(self, key)
+#define cropElemKeySG cropElemKeySO
+
+#define cropElemKeyDictO(self, key) (self)->f->cropElemKeyDict(self, key)
+#define cropElemKeyDictG cropElemKeyDictO
+
+#define cropElemKeyArrayO(self, key) (self)->f->cropElemKeyArray(self, key)
+#define cropElemKeyArrayG cropElemKeyArrayO
+
+#define cropElemKeySmallBoolO(self, key) (self)->f->cropElemKeySmallBool(self, key)
+#define cropElemKeySmallBoolG cropElemKeySmallBoolO
+
+#define cropElemKeySmallBytesO(self, key) (self)->f->cropElemKeySmallBytes(self, key)
+#define cropElemKeySmallBytesG cropElemKeySmallBytesO
+
+#define cropElemKeySmallDoubleO(self, key) (self)->f->cropElemKeySmallDouble(self, key)
+#define cropElemKeySmallDoubleG cropElemKeySmallDoubleO
+
+#define cropElemKeySmallIntO(self, key) (self)->f->cropElemKeySmallInt(self, key)
+#define cropElemKeySmallIntG cropElemKeySmallIntO
+
+#define cropElemKeySmallStringO(self, key) (self)->f->cropElemKeySmallString(self, key)
+#define cropElemKeySmallStringG cropElemKeySmallStringO
+
+#define cropElemKeyVoidO(self, key) (self)->f->cropElemKeyVoid(self, key)
+#define cropElemKeyVoidG cropElemKeyVoidO
+
+#define cropElemKeySmallContainerO(self, key) (self)->f->cropElemKeySmallContainer(self, key)
+#define cropElemKeySmallContainerG cropElemKeySmallContainerO
+
#define insertJsonO(self, index, toInsert) (self)->f->insertJson(self, index, toInsert)
#define insertJsonG insertJsonO
@@ -9464,6 +9978,19 @@ bool writeTextCG(const char **list, const char *filePath);
bool writeTextStreamCG(const char **list, FILE *fp);
/**
+ * call appendFileS (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendFileSG(const char *string, const char *filePath);
+
+/**
+ * call appendText (for appendFileG)
+ * (swaps parameters)
+ */
+bool appendTextSG(char **list, const char *filePath);
+bool appendTextCG(const char **list, const char *filePath);
+
+/**
* recursive mkdir
*
* \param
diff --git a/src/libsheepySmall.c b/src/libsheepySmall.c
@@ -232,9 +232,11 @@ sBoolt* allocSBool(bool value) {
sContainert* allocSContainer(void *data) {
sContainert *r = NULL;
- r = malloc(sizeof(sContainert));
- r->type = CONTAINER;
- r->data = data;
+ r = malloc(sizeof(sContainert));
+ r->type = CONTAINER;
+ r->dataType = SH_DT_UNKNOWN;
+ r->data = data;
+ r->free = NULL;
return(r);
}
@@ -375,6 +377,7 @@ void sFree(smallt *obj) {
* obj object to free
*/
void sFreeTiny(smallt *obj) {
+ sContainert *c = NULL;
switch(obj->type) {
case DICT:
@@ -383,6 +386,14 @@ void sFreeTiny(smallt *obj) {
case ARRAY:
sArrayFreeTiny((sArrayt *) obj);
break;
+ case CONTAINER:
+ c = (sContainert*)obj;
+ if (c->free) {
+ c->free(c->data);
+ c->data = NULL;
+ }
+ free(obj);
+ break;
default:
free(obj);
}
@@ -486,6 +497,7 @@ smallt* sDuplicate(smallt *o) {
smallt* sDuplicateTiny(smallt *obj) {
smallt *r = NULL;
sBytest *B = NULL;
+ sContainert *c = NULL;
switch(obj->type) {
case UNDEFINED:
@@ -496,7 +508,10 @@ smallt* sDuplicateTiny(smallt *obj) {
break;
case CONTAINER:
// data is not copied, same data pointer is used
- r = (smallt *)allocSContainer(((sContainert *)obj)->data);
+ c = allocSContainer(((sContainert *)obj)->data);
+ c->dataType = ((sContainert *)obj)->dataType;
+ c->free = ((sContainert *)obj)->free;
+ r = (smallt *)c;
break;
case DICT:
r = (smallt *)sDictDuplicateTiny((sDictt *)obj);
diff --git a/src/libsheepySmall.h b/src/libsheepySmall.h
@@ -79,12 +79,18 @@ typedef struct {
/**
* small container holding a pointer to a buffer
*/
+typedef void (*freeSContainerFt)(void *data);
typedef struct {
char type;
+ char dataType;
// data is an array of size size
void *data;
+ freeSContainerFt free;
} sContainert;
+// libsheepy dataTypes in sContainert (SH for libsheepy, DT for dataType)
+enum { SH_DT_UNKNOWN, SH_DT_BASET};
+
/**
* dictionary element: key, value
*/
diff --git a/src/libsheepyTest.c b/src/libsheepyTest.c
@@ -4139,7 +4139,8 @@ START_TEST(insertST)
free(s);
// NULL string
s = insertS(NULL, 0, "s");
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
END_TEST
@@ -4147,7 +4148,7 @@ END_TEST
START_TEST(insertNFreeST)
- char *s;
+ char *s, *a;
// insert
s = insertNFreeS("sheepy", 0, strdup("lib"));
@@ -4162,10 +4163,12 @@ START_TEST(insertNFreeST)
ck_assert_str_eq(s, "qweC");
free(s);
// outside string
- s = insertNFreeS("qwe", 4, strdup("C"));
+ a = strdup("C");
+ s = insertNFreeS("qwe", 4, a);
ck_assert_ptr_eq(s, NULL);
- s = insertNFreeS("qwe", -5, strdup("C"));
+ s = insertNFreeS("qwe", -5, a);
ck_assert_ptr_eq(s, NULL);
+ free(a);
// negative index in a one char string
s = insertNFreeS("s", -1, strdup("S"));
ck_assert_str_eq(s, "sS");
@@ -4187,7 +4190,8 @@ START_TEST(insertNFreeST)
free(s);
// NULL string
s = insertNFreeS(NULL, 0, strdup("s"));
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
END_TEST
@@ -4246,7 +4250,8 @@ START_TEST(iInsertST)
// NULL string
s = NULL;
iInsertS(&s, 0, "s");
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
// NULL var
iInsertS(NULL, 0, "s");
@@ -4255,7 +4260,7 @@ END_TEST
START_TEST(iInsertNFreeST)
- char *s;
+ char *s, *a, *r;
// insert
s = strdup("sheepy");
@@ -4274,9 +4279,13 @@ START_TEST(iInsertNFreeST)
free(s);
// outside string
s = strdup("qwe");
- iInsertNFreeS(&s, 4, strdup("C"));
+ a = strdup("C");
+ r = iInsertNFreeS(&s, 4, a);
+ ck_assert_ptr_eq(r, NULL);
ck_assert_str_eq(s, "qwe");
- iInsertNFreeS(&s, -5, strdup("C"));
+ r = iInsertNFreeS(&s, -5, a);
+ ck_assert_ptr_eq(r, NULL);
+ free(a);
ck_assert_str_eq(s, "qwe");
free(s);
// negative index in a one char string
@@ -4306,9 +4315,13 @@ START_TEST(iInsertNFreeST)
// NULL string
s = NULL;
iInsertNFreeS(&s, 0, strdup("s"));
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
// NULL var
- iInsertNFreeS(NULL, 0, strdup("s"));
+ s = strdup("s");
+ r = iInsertNFreeS(NULL, 0, s);
+ ck_assert_ptr_eq(r, NULL);
+ free(s);
END_TEST
@@ -4448,7 +4461,8 @@ START_TEST(injectST)
free(s);
// NULL string
s = injectS(NULL, 0, 's');
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
END_TEST
@@ -4497,7 +4511,8 @@ START_TEST(iInjectST)
// NULL string
s = NULL;
iInjectS(&s, 0, 's');
- ck_assert_ptr_eq(s, NULL);
+ ck_assert_str_eq(s, "s");
+ free(s);
// NULL var
iInjectS(NULL, 0, 's');
@@ -5035,8 +5050,7 @@ START_TEST(listPushST)
// NULL list and NULL string
l = NULL;
listPushS(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- listFreeS(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmptyS(l)
listPushS(&l, "sheepy");
@@ -5071,8 +5085,7 @@ START_TEST(iListPushST)
// NULL list and NULL string
l = NULL;
iListPushS(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- listFreeS(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmptyS(l)
s = strdup("sheepy");
@@ -5134,8 +5147,7 @@ START_TEST(listPrependST)
// NULL list and NULL string`
l = NULL;
listPrependS(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- listFreeS(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmptyS(l)
listPrependS(&l, "sheepy");
@@ -5170,8 +5182,7 @@ START_TEST(iListPrependST)
// NULL list and NULL string
l = NULL;
iListPrependS(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- listFreeS(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmptyS(l)
s = strdup("sheepy");
@@ -6719,7 +6730,7 @@ END_TEST
START_TEST(iListInsertNFreeST)
- char **l;
+ char **l, **r;
char **l2;
// insert
@@ -6752,12 +6763,18 @@ START_TEST(iListInsertNFreeST)
// outside list
l = listCreateS("1","22");
l2 = listCreateS("lib");
- iListInsertNFreeS(&l, 4, l2);
+ r = iListInsertNFreeS(&l, 4, l2);
+ ck_assert_ptr_eq(r, NULL);
+ // free L2 since it is not freed because iListInsertNFreeS failed
+ listFreeS(l2);
ck_assert_uint_eq(listLengthS(l),2);
ck_assert_str_eq(l[0], "1");
ck_assert_str_eq(l[1], "22");
l2 = listCreateS("lib");
- iListInsertNFreeS(&l, -4, l2);
+ r = iListInsertNFreeS(&l, -4, l2);
+ ck_assert_ptr_eq(r, NULL);
+ // free L2 since it is not freed because iListInsertNFreeS failed
+ listFreeS(l2);
ck_assert_uint_eq(listLengthS(l),2);
ck_assert_str_eq(l[0], "1");
ck_assert_str_eq(l[1], "22");
@@ -6793,11 +6810,14 @@ START_TEST(iListInsertNFreeST)
l = NULL;
l2 = listCreateS("lib");
iListInsertNFreeS(&l, 0, l2);
- ck_assert_ptr_eq(l, NULL);
+ ck_assert_str_eq(l[0], "lib");
+ listFreeS(l);
// NULL var
l2 = listCreateS("lib");
- iListInsertNFreeS(NULL, 0, l2);
-
+ l = iListInsertNFreeS(NULL, 0, l2);
+ ck_assert_ptr_eq(l, NULL);
+ // free L2 since it is not freed because iListInsertNFreeS failed
+ listFreeS(l2);
END_TEST
@@ -6853,8 +6873,8 @@ START_TEST(listInjectST)
// NULL insert string
l = listCreateS("1");
r = listInjectS(l, 0, NULL);
- ck_assert_str_eq(r[0], "1");
- listFreeManyS(r,l);
+ ck_assert_ptr_eq(r, NULL);
+ listFreeManyS(l,r);
// NULL list
r = listInjectS(NULL, 0, NULL);
ck_assert_ptr_eq(r, NULL);
@@ -7499,8 +7519,7 @@ START_TEST(listPushT)
// NULL list and NULL string
l = NULL;
listPush(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- free(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmpty(l);
listPush(&l, (void *)s);
@@ -7563,8 +7582,7 @@ START_TEST(listPrependT)
// NULL list and NULL string`
l = NULL;
listPrepend(&l, NULL);
- ck_assert_ptr_eq(l[0], NULL);
- free(l);
+ ck_assert_ptr_eq(l, NULL);
// empty list
listEmpty(l)
listPrepend(&l, (void *)s1);
@@ -8248,8 +8266,8 @@ START_TEST(listInsertT)
freeManyS(r,l2);
// NULL insert string
r = listInsert(l, 0, NULL);
- ck_assert_str_eq(r[0], "1");
- freeManyS(r,l);
+ ck_assert_ptr_eq(r, NULL);
+ free(l);
// NULL list
r = listInsert(NULL, 0, NULL);
ck_assert_ptr_eq(r, NULL);