Lines Matching refs:data
36 getNode( struct json_benc_data * data )
41 if( tr_ptrArrayEmpty( &data->stack ) )
44 parent = tr_ptrArrayBack( &data->stack );
47 node = data->top;
50 else if( tr_bencIsDict( parent ) && data->key )
52 node = tr_bencDictAdd( parent, data->key );
53 tr_free( data->key );
54 data->key = NULL;
65 struct json_benc_data * data = vdata;
71 data->hasContent = true;
72 node = getNode( data );
74 tr_ptrArrayAppend( &data->stack, node );
78 tr_ptrArrayPop( &data->stack );
82 data->hasContent = true;
83 node = getNode( data );
85 tr_ptrArrayAppend( &data->stack, node );
89 tr_ptrArrayPop( &data->stack );
93 data->hasContent = true;
94 tr_bencInitReal( getNode( data ), value->vu.float_value );
98 data->hasContent = true;
99 tr_bencInitStr( getNode( data ), "", 0 );
103 data->hasContent = true;
104 tr_bencInitInt( getNode( data ), value->vu.integer_value );
108 data->hasContent = true;
109 tr_bencInitBool( getNode( data ), 1 );
113 data->hasContent = true;
114 tr_bencInitBool( getNode( data ), 0 );
118 data->hasContent = true;
119 tr_bencInitStr( getNode( data ),
125 data->hasContent = true;
126 assert( !data->key );
127 data->key = tr_strndup( value->vu.str.value, value->vu.str.length );
148 struct json_benc_data data;
152 config.callback_ctx = &data;
155 data.hasContent = false;
156 data.key = NULL;
157 data.top = setme_benc;
158 data.stack = TR_PTR_ARRAY_INIT;
179 if( !data.hasContent )
186 tr_ptrArrayDestruct( &data.stack, NULL );