@@ -36,18 +36,18 @@ void rxml_attr_mark(xmlAttrPtr xattr)
3636{
3737 /* This can happen if Ruby does a GC run after creating the
3838 new attribute but before initializing it. */
39- if (xattr != NULL )
39+ if (xattr != nullptr )
4040 rxml_node_mark ((xmlNodePtr ) xattr );
4141}
4242
4343VALUE rxml_attr_wrap (xmlAttrPtr xattr )
4444{
45- return Data_Wrap_Struct (cXMLAttr , rxml_attr_mark , NULL , xattr );
45+ return Data_Wrap_Struct (cXMLAttr , rxml_attr_mark , nullptr , xattr );
4646}
4747
4848static VALUE rxml_attr_alloc (VALUE klass )
4949{
50- return Data_Wrap_Struct (klass , rxml_attr_mark , NULL , NULL );
50+ return Data_Wrap_Struct (klass , rxml_attr_mark , nullptr , nullptr );
5151}
5252
5353/*
@@ -111,7 +111,7 @@ static VALUE rxml_attr_child_get(VALUE self)
111111{
112112 xmlAttrPtr xattr ;
113113 Data_Get_Struct (self , xmlAttr , xattr );
114- if (xattr -> children == NULL )
114+ if (xattr -> children == nullptr )
115115 return Qnil ;
116116 else
117117 return rxml_node_wrap ((xmlNodePtr ) xattr -> children );
@@ -130,7 +130,7 @@ static VALUE rxml_attr_doc_get(VALUE self)
130130{
131131 xmlAttrPtr xattr ;
132132 Data_Get_Struct (self , xmlAttr , xattr );
133- if (xattr -> doc == NULL )
133+ if (xattr -> doc == nullptr )
134134 return Qnil ;
135135 else
136136 return rxml_document_wrap (xattr -> doc );
@@ -146,7 +146,7 @@ static VALUE rxml_attr_last_get(VALUE self)
146146{
147147 xmlAttrPtr xattr ;
148148 Data_Get_Struct (self , xmlAttr , xattr );
149- if (xattr -> last == NULL )
149+ if (xattr -> last == nullptr )
150150 return Qnil ;
151151 else
152152 return rxml_node_wrap (xattr -> last );
@@ -163,10 +163,10 @@ static VALUE rxml_attr_name_get(VALUE self)
163163 xmlAttrPtr xattr ;
164164 Data_Get_Struct (self , xmlAttr , xattr );
165165
166- if (xattr -> name == NULL )
166+ if (xattr -> name == nullptr )
167167 return Qnil ;
168168 else
169- return rxml_new_cstr ( xattr -> name , NULL );
169+ return rxml_new_cstr ( xattr -> name , nullptr );
170170}
171171
172172/*
@@ -179,7 +179,7 @@ static VALUE rxml_attr_next_get(VALUE self)
179179{
180180 xmlAttrPtr xattr ;
181181 Data_Get_Struct (self , xmlAttr , xattr );
182- if (xattr -> next == NULL )
182+ if (xattr -> next == nullptr )
183183 return Qnil ;
184184 else
185185 return rxml_attr_wrap (xattr -> next );
@@ -208,7 +208,7 @@ static VALUE rxml_attr_ns_get(VALUE self)
208208{
209209 xmlAttrPtr xattr ;
210210 Data_Get_Struct (self , xmlAttr , xattr );
211- if (xattr -> ns == NULL )
211+ if (xattr -> ns == nullptr )
212212 return Qnil ;
213213 else
214214 return rxml_namespace_wrap (xattr -> ns );
@@ -224,7 +224,7 @@ static VALUE rxml_attr_parent_get(VALUE self)
224224{
225225 xmlAttrPtr xattr ;
226226 Data_Get_Struct (self , xmlAttr , xattr );
227- if (xattr -> parent == NULL )
227+ if (xattr -> parent == nullptr )
228228 return Qnil ;
229229 else
230230 return rxml_node_wrap (xattr -> parent );
@@ -240,7 +240,7 @@ static VALUE rxml_attr_prev_get(VALUE self)
240240{
241241 xmlAttrPtr xattr ;
242242 Data_Get_Struct (self , xmlAttr , xattr );
243- if (xattr -> prev == NULL )
243+ if (xattr -> prev == nullptr )
244244 return Qnil ;
245245 else
246246 return rxml_attr_wrap (xattr -> prev );
@@ -261,9 +261,9 @@ static VALUE rxml_attr_remove_ex(VALUE self)
261261 Data_Get_Struct (self , xmlAttr , xattr );
262262 xmlRemoveProp (xattr );
263263
264- RDATA (self )-> data = NULL ;
265- RDATA (self )-> dfree = NULL ;
266- RDATA (self )-> dmark = NULL ;
264+ RDATA (self )-> data = nullptr ;
265+ RDATA (self )-> dfree = nullptr ;
266+ RDATA (self )-> dmark = nullptr ;
267267
268268 return Qnil ;
269269}
@@ -283,9 +283,9 @@ VALUE rxml_attr_value_get(VALUE self)
283283 Data_Get_Struct (self , xmlAttr , xattr );
284284 value = xmlNodeGetContent ((xmlNodePtr )xattr );
285285
286- if (value != NULL )
286+ if (value != nullptr )
287287 {
288- result = rxml_new_cstr ( value , NULL );
288+ result = rxml_new_cstr ( value , nullptr );
289289 xmlFree (value );
290290 }
291291 return result ;
0 commit comments