commit 2394bdbeefcb6d7ee06b6cbb4bed345b2e835a35
parent 7174601d4c2d29e94359b44aeb60fabe7b5edf4e
Author: Remy Noulin <loader2x@gmail.com>
Date: Mon, 24 Feb 2020 11:32:42 +0100
add null convenience define (=NULL), add cleanAllocate in smallClasses like createAllocate with cleanup
completion.txt | 10 ++++++++++
documentation.md | 11 +++++++++++
release/json/libsheepyCSmallArray.h | 5 +++++
release/json/libsheepyCSmallBool.h | 5 +++++
release/json/libsheepyCSmallBytes.h | 5 +++++
release/json/libsheepyCSmallContainer.h | 5 +++++
release/json/libsheepyCSmallDict.h | 5 +++++
release/json/libsheepyCSmallDouble.h | 5 +++++
release/json/libsheepyCSmallInt.h | 5 +++++
release/json/libsheepyCSmallJson.h | 5 +++++
release/json/libsheepyCSmallString.h | 5 +++++
release/json/libsheepyCUndefined.h | 5 +++++
release/libsheepy.h | 1 +
src/json/libsheepyCSmallArray.h | 5 +++++
src/json/libsheepyCSmallBool.h | 5 +++++
src/json/libsheepyCSmallBytes.h | 5 +++++
src/json/libsheepyCSmallContainer.h | 5 +++++
src/json/libsheepyCSmallDict.h | 5 +++++
src/json/libsheepyCSmallDouble.h | 5 +++++
src/json/libsheepyCSmallInt.h | 5 +++++
src/json/libsheepyCSmallJson.h | 5 +++++
src/json/libsheepyCSmallString.h | 5 +++++
src/json/libsheepyCUndefined.h | 5 +++++
src/libsheepy.h | 1 +
24 files changed, 123 insertions(+)
Diffstat:
24 files changed, 123 insertions(+), 0 deletions(-)
diff --git a/completion.txt b/completion.txt
@@ -5,6 +5,7 @@ var
const bool TRUE
#undef FALSE /* avoid conflict with ncurses */
const bool FALSE
+null
yes
on
no
@@ -3358,6 +3359,7 @@ SMALLDICTFUNCTIONST
createSmallDict(obj) ;smallDictt obj; initiateSmallDict(&obj)
createAllocateSmallDict(obj) ;smallDictt *obj; initiateAllocateSmallDict(&obj)
cleanSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictTerminateG)
+cleanAllocateSmallDict(obj) ;cleanSmallDictP(obj); initiateAllocateSmallDict(&obj)
cleanSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictFreeG); initiateSmallDict(&name)
cleanFinishSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictFinishG)
cleanDisposeSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictDisposeG); initiateSmallDict(&name)
@@ -3374,6 +3376,7 @@ SMALLARRAYFUNCTIONST
createSmallArray(obj) ;smallArrayt obj; initiateSmallArray(&obj)
createAllocateSmallArray(obj) ;smallArrayt *obj; initiateAllocateSmallArray(&obj)
cleanSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayTerminateG)
+cleanAllocateSmallArray(obj) ;cleanSmallArrayP(obj); initiateAllocateSmallArray(&obj)
cleanSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayFreeG); initiateSmallArray(&name)
cleanFinishSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayFinishG)
cleanDisposeSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayDisposeG); initiateSmallArray(&name)
@@ -3400,6 +3403,7 @@ createSmallJson(obj) ;smallJsont obj; initiateSmallJson(&obj)
createAllocateSmallJson(obj) ;smallJsont *obj; initiateAllocateSmallJson(&obj)
createSJ(...) createSJF("", __VA_ARGS__, NULL)
cleanSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonTerminateG)
+cleanAllocateSmallJson(obj) ;cleanSmallJsonP(obj); initiateAllocateSmallJson(&obj)
cleanSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonFreeG); initiateSmallJson(&name)
cleanFinishSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonFinishG)
cleanDisposeSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonDisposeG); initiateSmallJson(&name)
@@ -3417,6 +3421,7 @@ SMALLBYTESFUNCTIONST
createSmallBytes(obj) ;smallBytest obj; initiateSmallBytes(&obj)
createAllocateSmallBytes(obj) ;smallBytest *obj; initiateAllocateSmallBytes(&obj)
cleanSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesTerminateG)
+cleanAllocateSmallBytes(obj) ;cleanSmallBytesP(obj); initiateAllocateSmallBytes(&obj)
cleanSmallBytes(name) smallBytest name CLEANUP(cleanUpSmallBytesFreeG); initiateSmallBytes(&name)
cleanFinishSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesFinishG)
@@ -3429,6 +3434,7 @@ SMALLBOOLFUNCTIONST
createSmallBool(obj) ;smallBoolt obj; initiateSmallBool(&obj)
createAllocateSmallBool(obj) ;smallBoolt *obj; initiateAllocateSmallBool(&obj)
cleanSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolTerminateG)
+cleanAllocateSmallBool(obj) ;cleanSmallBoolP(obj); initiateAllocateSmallBool(&obj)
cleanSmallBool(name) smallBoolt name CLEANUP(cleanUpSmallBoolFreeG); initiateSmallBool(&name)
cleanFinishSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolFinishG)
@@ -3441,6 +3447,7 @@ SMALLCONTAINERFUNCTIONST
createSmallContainer(obj) ;smallContainert obj; initiateSmallContainer(&obj)
createAllocateSmallContainer(obj) ;smallContainert *obj; initiateAllocateSmallContainer(&obj)
cleanSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)
+cleanAllocateSmallContainer(obj) ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)
cleanSmallContainer(name) smallContainert name CLEANUP(cleanUpSmallContainerFreeG); initiateSmallContainer(&name)
cleanFinishSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerFinishG)
@@ -3453,6 +3460,7 @@ SMALLDOUBLEFUNCTIONST
createSmallDouble(obj) ;smallDoublet obj; initiateSmallDouble(&obj)
createAllocateSmallDouble(obj) ;smallDoublet *obj; initiateAllocateSmallDouble(&obj)
cleanSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleTerminateG)
+cleanAllocateSmallDouble(obj) ;cleanSmallDoubleP(obj); initiateAllocateSmallDouble(&obj)
cleanSmallDouble(name) smallDoublet name CLEANUP(cleanUpSmallDoubleFreeG); initiateSmallDouble(&name)
cleanFinishSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleFinishG)
@@ -3465,6 +3473,7 @@ SMALLINTFUNCTIONST
createSmallInt(obj) ;smallIntt obj; initiateSmallInt(&obj)
createAllocateSmallInt(obj) ;smallIntt *obj; initiateAllocateSmallInt(&obj)
cleanSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntTerminateG)
+cleanAllocateSmallInt(obj) ;cleanSmallIntP(obj); initiateAllocateSmallInt(&obj)
cleanSmallInt(name) smallIntt name CLEANUP(cleanUpSmallIntFreeG); initiateSmallInt(&name)
cleanFinishSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntFinishG)
@@ -3477,6 +3486,7 @@ SMALLSTRINGFUNCTIONST
createSmallString(obj) ;smallStringt obj; initiateSmallString(&obj)
createAllocateSmallString(obj) ;smallStringt *obj; initiateAllocateSmallString(&obj)
cleanSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringTerminateG)
+cleanAllocateSmallString(obj) ;cleanSmallStringP(obj); initiateAllocateSmallString(&obj)
cleanSmallString(name) smallStringt name CLEANUP(cleanUpSmallStringFreeG); initiateSmallString(&name)
cleanFinishSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringFinishG)
createS(...) createSF("", __VA_ARGS__, NULL)
diff --git a/documentation.md b/documentation.md
@@ -36,6 +36,7 @@ var
const bool TRUE
#undef FALSE /* avoid conflict with ncurses */
const bool FALSE
+null
yes
on
no
@@ -1408,6 +1409,7 @@ extern const bool TRUE;
#undef FALSE /* avoid conflict with ncurses */
extern const bool FALSE;
/** convenience defines */
+#define null NULL
#define yes true
#define on true
#define no false
@@ -17239,6 +17241,7 @@ SMALLDICTFUNCTIONST
createSmallDict(obj) ;smallDictt obj; initiateSmallDict(&obj)
createAllocateSmallDict(obj) ;smallDictt *obj; initiateAllocateSmallDict(&obj)
cleanSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictTerminateG)
+cleanAllocateSmallDict(obj) ;cleanSmallDictP(obj); initiateAllocateSmallDict(&obj)
cleanSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictFreeG); initiateSmallDict(&name)
cleanFinishSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictFinishG)
cleanDisposeSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictDisposeG); initiateSmallDict(&name)
@@ -17255,6 +17258,7 @@ SMALLARRAYFUNCTIONST
createSmallArray(obj) ;smallArrayt obj; initiateSmallArray(&obj)
createAllocateSmallArray(obj) ;smallArrayt *obj; initiateAllocateSmallArray(&obj)
cleanSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayTerminateG)
+cleanAllocateSmallArray(obj) ;cleanSmallArrayP(obj); initiateAllocateSmallArray(&obj)
cleanSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayFreeG); initiateSmallArray(&name)
cleanFinishSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayFinishG)
cleanDisposeSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayDisposeG); initiateSmallArray(&name)
@@ -17281,6 +17285,7 @@ createSmallJson(obj) ;smallJsont obj; initiateSmallJson(&obj)
createAllocateSmallJson(obj) ;smallJsont *obj; initiateAllocateSmallJson(&obj)
createSJ(...) createSJF("", __VA_ARGS__, NULL)
cleanSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonTerminateG)
+cleanAllocateSmallJson(obj) ;cleanSmallJsonP(obj); initiateAllocateSmallJson(&obj)
cleanSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonFreeG); initiateSmallJson(&name)
cleanFinishSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonFinishG)
cleanDisposeSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonDisposeG); initiateSmallJson(&name)
@@ -17298,6 +17303,7 @@ SMALLBYTESFUNCTIONST
createSmallBytes(obj) ;smallBytest obj; initiateSmallBytes(&obj)
createAllocateSmallBytes(obj) ;smallBytest *obj; initiateAllocateSmallBytes(&obj)
cleanSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesTerminateG)
+cleanAllocateSmallBytes(obj) ;cleanSmallBytesP(obj); initiateAllocateSmallBytes(&obj)
cleanSmallBytes(name) smallBytest name CLEANUP(cleanUpSmallBytesFreeG); initiateSmallBytes(&name)
cleanFinishSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesFinishG)
@@ -17310,6 +17316,7 @@ SMALLBOOLFUNCTIONST
createSmallBool(obj) ;smallBoolt obj; initiateSmallBool(&obj)
createAllocateSmallBool(obj) ;smallBoolt *obj; initiateAllocateSmallBool(&obj)
cleanSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolTerminateG)
+cleanAllocateSmallBool(obj) ;cleanSmallBoolP(obj); initiateAllocateSmallBool(&obj)
cleanSmallBool(name) smallBoolt name CLEANUP(cleanUpSmallBoolFreeG); initiateSmallBool(&name)
cleanFinishSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolFinishG)
@@ -17322,6 +17329,7 @@ SMALLCONTAINERFUNCTIONST
createSmallContainer(obj) ;smallContainert obj; initiateSmallContainer(&obj)
createAllocateSmallContainer(obj) ;smallContainert *obj; initiateAllocateSmallContainer(&obj)
cleanSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)
+cleanAllocateSmallContainer(obj) ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)
cleanSmallContainer(name) smallContainert name CLEANUP(cleanUpSmallContainerFreeG); initiateSmallContainer(&name)
cleanFinishSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerFinishG)
@@ -17334,6 +17342,7 @@ SMALLDOUBLEFUNCTIONST
createSmallDouble(obj) ;smallDoublet obj; initiateSmallDouble(&obj)
createAllocateSmallDouble(obj) ;smallDoublet *obj; initiateAllocateSmallDouble(&obj)
cleanSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleTerminateG)
+cleanAllocateSmallDouble(obj) ;cleanSmallDoubleP(obj); initiateAllocateSmallDouble(&obj)
cleanSmallDouble(name) smallDoublet name CLEANUP(cleanUpSmallDoubleFreeG); initiateSmallDouble(&name)
cleanFinishSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleFinishG)
@@ -17346,6 +17355,7 @@ SMALLINTFUNCTIONST
createSmallInt(obj) ;smallIntt obj; initiateSmallInt(&obj)
createAllocateSmallInt(obj) ;smallIntt *obj; initiateAllocateSmallInt(&obj)
cleanSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntTerminateG)
+cleanAllocateSmallInt(obj) ;cleanSmallIntP(obj); initiateAllocateSmallInt(&obj)
cleanSmallInt(name) smallIntt name CLEANUP(cleanUpSmallIntFreeG); initiateSmallInt(&name)
cleanFinishSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntFinishG)
@@ -17358,6 +17368,7 @@ SMALLSTRINGFUNCTIONST
createSmallString(obj) ;smallStringt obj; initiateSmallString(&obj)
createAllocateSmallString(obj) ;smallStringt *obj; initiateAllocateSmallString(&obj)
cleanSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringTerminateG)
+cleanAllocateSmallString(obj) ;cleanSmallStringP(obj); initiateAllocateSmallString(&obj)
cleanSmallString(name) smallStringt name CLEANUP(cleanUpSmallStringFreeG); initiateSmallString(&name)
cleanFinishSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringFinishG)
createS(...) createSF("", __VA_ARGS__, NULL)
diff --git a/release/json/libsheepyCSmallArray.h b/release/json/libsheepyCSmallArray.h
@@ -1862,6 +1862,11 @@ void cleanUpSmallArraySmashG(smallArrayt *val);
#define cleanSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayTerminateG)
/**
+ * allocate smallArray (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallArray(obj) ;cleanSmallArrayP(obj); initiateAllocateSmallArray(&obj)
+
+/**
* declare local object name with type smallArrayt and free name when it is out of scope
*/
#define cleanSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayFreeG); initiateSmallArray(&name)
diff --git a/release/json/libsheepyCSmallBool.h b/release/json/libsheepyCSmallBool.h
@@ -259,6 +259,11 @@ void cleanUpSmallBoolFinishG(smallBoolt *val);
#define cleanSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolTerminateG)
/**
+ * allocate smallBool (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallBool(obj) ;cleanSmallBoolP(obj); initiateAllocateSmallBool(&obj)
+
+/**
* declare local object name with type smallBoolt and free name when it is out of scope
*/
#define cleanSmallBool(name) smallBoolt name CLEANUP(cleanUpSmallBoolFreeG); initiateSmallBool(&name)
diff --git a/release/json/libsheepyCSmallBytes.h b/release/json/libsheepyCSmallBytes.h
@@ -262,6 +262,11 @@ void cleanUpSmallBytesFinishG(smallBytest *val);
#define cleanSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesTerminateG)
/**
+ * allocate smallBytes (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallBytes(obj) ;cleanSmallBytesP(obj); initiateAllocateSmallBytes(&obj)
+
+/**
* declare local object name with type smallBytest and free name when it is out of scope
*/
#define cleanSmallBytes(name) smallBytest name CLEANUP(cleanUpSmallBytesFreeG); initiateSmallBytes(&name)
diff --git a/release/json/libsheepyCSmallContainer.h b/release/json/libsheepyCSmallContainer.h
@@ -229,6 +229,11 @@ void cleanUpSmallContainerFinishG(smallContainert *val);
#define cleanSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)
/**
+ * allocate smallContainer (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallContainer(obj) ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)
+
+/**
* declare local object name with type smallContainert and free name when it is out of scope
*/
#define cleanSmallContainer(name) smallContainert name CLEANUP(cleanUpSmallContainerFreeG); initiateSmallContainer(&name)
diff --git a/release/json/libsheepyCSmallDict.h b/release/json/libsheepyCSmallDict.h
@@ -1067,6 +1067,11 @@ void cleanUpSmallDictSmashG(smallDictt *val);
#define cleanSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictTerminateG)
/**
+ * allocate smallDict (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallDict(obj) ;cleanSmallDictP(obj); initiateAllocateSmallDict(&obj)
+
+/**
* declare local object name with type smallDictt and free name when it is out of scope
*/
#define cleanSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictFreeG); initiateSmallDict(&name)
diff --git a/release/json/libsheepyCSmallDouble.h b/release/json/libsheepyCSmallDouble.h
@@ -257,6 +257,11 @@ void cleanUpSmallDoubleFinishG(smallDoublet *val);
#define cleanSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleTerminateG)
/**
+ * allocate smallDouble (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallDouble(obj) ;cleanSmallDoubleP(obj); initiateAllocateSmallDouble(&obj)
+
+/**
* declare local object name with type smallDoublet and free name when it is out of scope
*/
#define cleanSmallDouble(name) smallDoublet name CLEANUP(cleanUpSmallDoubleFreeG); initiateSmallDouble(&name)
diff --git a/release/json/libsheepyCSmallInt.h b/release/json/libsheepyCSmallInt.h
@@ -259,6 +259,11 @@ void cleanUpSmallIntFinishG(smallIntt *val);
#define cleanSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntTerminateG)
/**
+ * allocate smallInt (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallInt(obj) ;cleanSmallIntP(obj); initiateAllocateSmallInt(&obj)
+
+/**
* declare local object name with type smallIntt and free name when it is out of scope
*/
#define cleanSmallInt(name) smallIntt name CLEANUP(cleanUpSmallIntFreeG); initiateSmallInt(&name)
diff --git a/release/json/libsheepyCSmallJson.h b/release/json/libsheepyCSmallJson.h
@@ -3447,6 +3447,11 @@ void cleanUpSmallJsonSmashG(smallJsont *val);
#define cleanSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonTerminateG)
/**
+ * allocate smallJson (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallJson(obj) ;cleanSmallJsonP(obj); initiateAllocateSmallJson(&obj)
+
+/**
* declare local object name with Type smallJsont and free name when it is out of scope
*/
#define cleanSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonFreeG); initiateSmallJson(&name)
diff --git a/release/json/libsheepyCSmallString.h b/release/json/libsheepyCSmallString.h
@@ -1297,6 +1297,11 @@ void cleanUpSmallStringFinishG(smallStringt *val);
#define cleanSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringTerminateG)
/**
+ * allocate smallString (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallString(obj) ;cleanSmallStringP(obj); initiateAllocateSmallString(&obj)
+
+/**
* declare local object name with type smallStringt and free name when it is out of scope
*/
#define cleanSmallString(name) smallStringt name CLEANUP(cleanUpSmallStringFreeG); initiateSmallString(&name)
diff --git a/release/json/libsheepyCUndefined.h b/release/json/libsheepyCUndefined.h
@@ -89,6 +89,11 @@ void cleanUpUndefinedSmashG(undefinedt *val);
#define cleanUndefinedP(name) undefinedt *name CLEANUP(cleanUpUndefinedTerminateG)
/**
+ * allocate undefined (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateUndefined(obj) ;cleanUndefinedP(obj); initiateAllocateUndefined(&obj)
+
+/**
* declare local object name with type undefinedt and free name when it is out of scope
*/
#define cleanUndefined(name) undefinedt name CLEANUP(cleanUpUndefinedFreeG); initiateUndefined(&name)
diff --git a/release/libsheepy.h b/release/libsheepy.h
@@ -121,6 +121,7 @@ extern const bool TRUE;
extern const bool FALSE;
/** convenience defines */
+#define null NULL
#define yes true
#define on true
#define no false
diff --git a/src/json/libsheepyCSmallArray.h b/src/json/libsheepyCSmallArray.h
@@ -1862,6 +1862,11 @@ void cleanUpSmallArraySmashG(smallArrayt *val);
#define cleanSmallArrayP(name) smallArrayt *name CLEANUP(cleanUpSmallArrayTerminateG)
/**
+ * allocate smallArray (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallArray(obj) ;cleanSmallArrayP(obj); initiateAllocateSmallArray(&obj)
+
+/**
* declare local object name with type smallArrayt and free name when it is out of scope
*/
#define cleanSmallArray(name) smallArrayt name CLEANUP(cleanUpSmallArrayFreeG); initiateSmallArray(&name)
diff --git a/src/json/libsheepyCSmallBool.h b/src/json/libsheepyCSmallBool.h
@@ -259,6 +259,11 @@ void cleanUpSmallBoolFinishG(smallBoolt *val);
#define cleanSmallBoolP(name) smallBoolt *name CLEANUP(cleanUpSmallBoolTerminateG)
/**
+ * allocate smallBool (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallBool(obj) ;cleanSmallBoolP(obj); initiateAllocateSmallBool(&obj)
+
+/**
* declare local object name with type smallBoolt and free name when it is out of scope
*/
#define cleanSmallBool(name) smallBoolt name CLEANUP(cleanUpSmallBoolFreeG); initiateSmallBool(&name)
diff --git a/src/json/libsheepyCSmallBytes.h b/src/json/libsheepyCSmallBytes.h
@@ -262,6 +262,11 @@ void cleanUpSmallBytesFinishG(smallBytest *val);
#define cleanSmallBytesP(name) smallBytest *name CLEANUP(cleanUpSmallBytesTerminateG)
/**
+ * allocate smallBytes (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallBytes(obj) ;cleanSmallBytesP(obj); initiateAllocateSmallBytes(&obj)
+
+/**
* declare local object name with type smallBytest and free name when it is out of scope
*/
#define cleanSmallBytes(name) smallBytest name CLEANUP(cleanUpSmallBytesFreeG); initiateSmallBytes(&name)
diff --git a/src/json/libsheepyCSmallContainer.h b/src/json/libsheepyCSmallContainer.h
@@ -229,6 +229,11 @@ void cleanUpSmallContainerFinishG(smallContainert *val);
#define cleanSmallContainerP(name) smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)
/**
+ * allocate smallContainer (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallContainer(obj) ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)
+
+/**
* declare local object name with type smallContainert and free name when it is out of scope
*/
#define cleanSmallContainer(name) smallContainert name CLEANUP(cleanUpSmallContainerFreeG); initiateSmallContainer(&name)
diff --git a/src/json/libsheepyCSmallDict.h b/src/json/libsheepyCSmallDict.h
@@ -1067,6 +1067,11 @@ void cleanUpSmallDictSmashG(smallDictt *val);
#define cleanSmallDictP(name) smallDictt *name CLEANUP(cleanUpSmallDictTerminateG)
/**
+ * allocate smallDict (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallDict(obj) ;cleanSmallDictP(obj); initiateAllocateSmallDict(&obj)
+
+/**
* declare local object name with type smallDictt and free name when it is out of scope
*/
#define cleanSmallDict(name) smallDictt name CLEANUP(cleanUpSmallDictFreeG); initiateSmallDict(&name)
diff --git a/src/json/libsheepyCSmallDouble.h b/src/json/libsheepyCSmallDouble.h
@@ -257,6 +257,11 @@ void cleanUpSmallDoubleFinishG(smallDoublet *val);
#define cleanSmallDoubleP(name) smallDoublet *name CLEANUP(cleanUpSmallDoubleTerminateG)
/**
+ * allocate smallDouble (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallDouble(obj) ;cleanSmallDoubleP(obj); initiateAllocateSmallDouble(&obj)
+
+/**
* declare local object name with type smallDoublet and free name when it is out of scope
*/
#define cleanSmallDouble(name) smallDoublet name CLEANUP(cleanUpSmallDoubleFreeG); initiateSmallDouble(&name)
diff --git a/src/json/libsheepyCSmallInt.h b/src/json/libsheepyCSmallInt.h
@@ -259,6 +259,11 @@ void cleanUpSmallIntFinishG(smallIntt *val);
#define cleanSmallIntP(name) smallIntt *name CLEANUP(cleanUpSmallIntTerminateG)
/**
+ * allocate smallInt (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallInt(obj) ;cleanSmallIntP(obj); initiateAllocateSmallInt(&obj)
+
+/**
* declare local object name with type smallIntt and free name when it is out of scope
*/
#define cleanSmallInt(name) smallIntt name CLEANUP(cleanUpSmallIntFreeG); initiateSmallInt(&name)
diff --git a/src/json/libsheepyCSmallJson.h b/src/json/libsheepyCSmallJson.h
@@ -3447,6 +3447,11 @@ void cleanUpSmallJsonSmashG(smallJsont *val);
#define cleanSmallJsonP(name) smallJsont *name CLEANUP(cleanUpSmallJsonTerminateG)
/**
+ * allocate smallJson (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallJson(obj) ;cleanSmallJsonP(obj); initiateAllocateSmallJson(&obj)
+
+/**
* declare local object name with Type smallJsont and free name when it is out of scope
*/
#define cleanSmallJson(name) smallJsont name CLEANUP(cleanUpSmallJsonFreeG); initiateSmallJson(&name)
diff --git a/src/json/libsheepyCSmallString.h b/src/json/libsheepyCSmallString.h
@@ -1297,6 +1297,11 @@ void cleanUpSmallStringFinishG(smallStringt *val);
#define cleanSmallStringP(name) smallStringt *name CLEANUP(cleanUpSmallStringTerminateG)
/**
+ * allocate smallString (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateSmallString(obj) ;cleanSmallStringP(obj); initiateAllocateSmallString(&obj)
+
+/**
* declare local object name with type smallStringt and free name when it is out of scope
*/
#define cleanSmallString(name) smallStringt name CLEANUP(cleanUpSmallStringFreeG); initiateSmallString(&name)
diff --git a/src/json/libsheepyCUndefined.h b/src/json/libsheepyCUndefined.h
@@ -89,6 +89,11 @@ void cleanUpUndefinedSmashG(undefinedt *val);
#define cleanUndefinedP(name) undefinedt *name CLEANUP(cleanUpUndefinedTerminateG)
/**
+ * allocate undefined (pointer) and clean up when it is out of scope
+ */
+#define cleanAllocateUndefined(obj) ;cleanUndefinedP(obj); initiateAllocateUndefined(&obj)
+
+/**
* declare local object name with type undefinedt and free name when it is out of scope
*/
#define cleanUndefined(name) undefinedt name CLEANUP(cleanUpUndefinedFreeG); initiateUndefined(&name)
diff --git a/src/libsheepy.h b/src/libsheepy.h
@@ -121,6 +121,7 @@ extern const bool TRUE;
extern const bool FALSE;
/** convenience defines */
+#define null NULL
#define yes true
#define on true
#define no false