diff options
Diffstat (limited to 'doc/classes/JSON/Ext/Generator/State.src/M000121.html')
-rw-r--r-- | doc/classes/JSON/Ext/Generator/State.src/M000121.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/classes/JSON/Ext/Generator/State.src/M000121.html b/doc/classes/JSON/Ext/Generator/State.src/M000121.html new file mode 100644 index 0000000..c3556c3 --- /dev/null +++ b/doc/classes/JSON/Ext/Generator/State.src/M000121.html @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + <title>initialize_copy (JSON::Ext::Generator::State)</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" /> +</head> +<body class="standalone-code"> + <pre>/* + * call-seq: initialize_copy(orig) + * + * Initializes this object from orig if it to be duplicated/cloned and returns + * it. +*/ +static VALUE cState_init_copy(VALUE obj, VALUE orig) +{ + JSON_Generator_State *objState, *origState; + + Data_Get_Struct(obj, JSON_Generator_State, objState); + Data_Get_Struct(orig, JSON_Generator_State, origState); + if (!objState) rb_raise(rb_eArgError, "unallocated JSON::State"); + + MEMCPY(objState, origState, JSON_Generator_State, 1); + objState->indent = fstrndup(origState->indent, origState->indent_len); + objState->space = fstrndup(origState->space, origState->space_len); + objState->space_before = fstrndup(origState->space_before, origState->space_before_len); + objState->object_nl = fstrndup(origState->object_nl, origState->object_nl_len); + objState->array_nl = fstrndup(origState->array_nl, origState->array_nl_len); + if (origState->array_delim) objState->array_delim = fbuffer_dup(origState->array_delim); + if (origState->object_delim) objState->object_delim = fbuffer_dup(origState->object_delim); + if (origState->object_delim2) objState->object_delim2 = fbuffer_dup(origState->object_delim2); + return obj; +}</pre> +</body> +</html>
\ No newline at end of file |