--- CBOR-XS/XS.xs 2013/11/28 11:43:26 1.31 +++ CBOR-XS/XS.xs 2013/11/28 12:08:07 1.32 @@ -61,8 +61,8 @@ #define F_SHRINK 0x00000001UL #define F_ALLOW_UNKNOWN 0x00000002UL -#define F_ALLOW_SHARING 0x00000004UL //TODO -#define F_ALLOW_STRINGREF 0x00000008UL //TODO +#define F_ALLOW_SHARING 0x00000004UL +#define F_PACK_STRINGS 0x00000008UL #define INIT_SIZE 32 // initial scalar size to be allocated @@ -244,7 +244,7 @@ static void encode_strref (enc_t *enc, int utf8, char *str, STRLEN len) { - if (ecb_expect_false (enc->cbor.flags & F_ALLOW_STRINGREF)) + if (ecb_expect_false (enc->cbor.flags & F_PACK_STRINGS)) { SV **svp = hv_fetch (enc->stringref[!!utf8], str, len, 1); @@ -528,7 +528,7 @@ SvPOK_only (enc.sv); - if (cbor->flags & F_ALLOW_STRINGREF) + if (cbor->flags & F_PACK_STRINGS) { encode_tag (&enc, CBOR_TAG_STRINGREF_NAMESPACE); enc.stringref[0]= (HV *)sv_2mortal ((SV *)newHV ()); @@ -1147,7 +1147,7 @@ shrink = F_SHRINK allow_unknown = F_ALLOW_UNKNOWN allow_sharing = F_ALLOW_SHARING - allow_stringref = F_ALLOW_STRINGREF + pack_strings = F_PACK_STRINGS PPCODE: { if (enable) @@ -1163,7 +1163,7 @@ get_shrink = F_SHRINK get_allow_unknown = F_ALLOW_UNKNOWN get_allow_sharing = F_ALLOW_SHARING - get_allow_stringref = F_ALLOW_STRINGREF + get_pack_strings = F_PACK_STRINGS PPCODE: XPUSHs (boolSV (self->flags & ix));