MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / primitiveValue

Function primitiveValue

External/tiny-json/tiny-json.c:206–212  ·  view source on GitHub ↗

Parser a string to get a primitive value. * If the first character after the value is different of '}' or ']' is set to '\0'. * @param str Pointer to first character. * @param property Property handler to set the value and the type, (true, false or null). * @param value String with the primitive literal. * @param type The code of the type. ( JSON_BOOLEAN or JSON_NULL ) * @retval Pointe

Source from the content-addressed store, hash-verified

204 * @retval Pointer to first non white space after the string. If success.
205 * @retval Null pointer if any error occur. */
206static char* primitiveValue( char* ptr, json_t* property, char const* value, jsonType_t type ) {
207 ptr = checkStr( ptr, value );
208 if ( !ptr || !isEndOfPrimitive( *ptr ) ) return 0;
209 ptr = setToNull( ptr );
210 property->type = type;
211 return ptr;
212}
213
214/** Parser a string to get a true value.
215 * If the first character after the value is different of '}' or ']' is set to '\0'.

Callers 3

trueValueFunction · 0.85
falseValueFunction · 0.85
nullValueFunction · 0.85

Calls 3

checkStrFunction · 0.85
isEndOfPrimitiveFunction · 0.85
setToNullFunction · 0.85

Tested by

no test coverage detected