Skip to content
Snippets Groups Projects
Commit 6b5861a7 authored by deuce's avatar deuce
Browse files

Remove *_TO_STRING() macro definitions. They could be considered harmful.

parent a41d284c
Branches
Tags
No related merge requests found
......@@ -245,33 +245,6 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
JSSTRING_TO_ASTRING((cx), JSVTSstr, (ret), (maxsize), (lenptr)); \
}
#define JSSTRING_TO_STRING(cx, str, ret, lenptr) \
{ \
size_t *JSSTSlenptr=lenptr; \
size_t JSSTSlen; \
size_t JSSTSpos; \
const jschar *JSSTSstrval; \
\
if(JSSTSlenptr==NULL) \
JSSTSlenptr=&JSSTSlen; \
(ret)=NULL; \
if((str) != NULL) { \
if((JSSTSstrval=JS_GetStringCharsAndLength((cx), (str), JSSTSlenptr))) { \
if(((ret)=(char *)alloca(*JSSTSlenptr+1))) { \
for(JSSTSpos=0; JSSTSpos<*JSSTSlenptr; JSSTSpos++) \
(ret)[JSSTSpos]=(char)JSSTSstrval[JSSTSpos]; \
(ret)[*JSSTSlenptr]=0; \
} \
} \
} \
}
#define JSVALUE_TO_STRING(cx, val, ret, lenptr) \
{ \
JSString *JSVTSstr=JS_ValueToString((cx), (val)); \
JSSTRING_TO_STRING((cx), JSVTSstr, (ret), lenptr); \
}
#endif
#ifdef USE_CRYPTLIB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment