summaryrefslogtreecommitdiff
path: root/xs.h
diff options
context:
space:
mode:
authorGravatar default2024-05-27 05:49:29 +0200
committerGravatar default2024-05-27 05:49:29 +0200
commit36764b8ade5ee4686b04acb251f586eec4dacfad (patch)
tree573e5b170842522b6e79f21e61a5aa2a53e538b3 /xs.h
parentUpdated documentation. (diff)
downloadpenes-snac2-36764b8ade5ee4686b04acb251f586eec4dacfad.tar.gz
penes-snac2-36764b8ade5ee4686b04acb251f586eec4dacfad.tar.xz
penes-snac2-36764b8ade5ee4686b04acb251f586eec4dacfad.zip
Minor tweak to markdown-like links.
Diffstat (limited to 'xs.h')
-rw-r--r--xs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xs.h b/xs.h
index 972665c..56771e1 100644
--- a/xs.h
+++ b/xs.h
@@ -277,7 +277,7 @@ int _xs_get_size(const xs_val *ptr)
277/* must match _XS_TYPE_SIZE */ 277/* must match _XS_TYPE_SIZE */
278{ 278{
279 int i; 279 int i;
280 memcpy(&i, ptr, sizeof(i)); 280 memcpy(&i, ptr + 1, sizeof(i));
281 return i; 281 return i;
282} 282}
283 283
@@ -299,7 +299,7 @@ int xs_size(const xs_val *data)
299 case XSTYPE_LIST: 299 case XSTYPE_LIST:
300 case XSTYPE_DICT: 300 case XSTYPE_DICT:
301 case XSTYPE_DATA: 301 case XSTYPE_DATA:
302 len = _xs_get_size(data + 1); 302 len = _xs_get_size(data);
303 303
304 break; 304 break;
305 305
@@ -1286,7 +1286,7 @@ xs_data *xs_data_new(const void *data, int size)
1286int xs_data_size(const xs_data *value) 1286int xs_data_size(const xs_data *value)
1287/* returns the size of the data stored inside value */ 1287/* returns the size of the data stored inside value */
1288{ 1288{
1289 return _xs_get_size(value + 1) - (1 + _XS_TYPE_SIZE); 1289 return _xs_get_size(value) - (1 + _XS_TYPE_SIZE);
1290} 1290}
1291 1291
1292 1292