title: How to return $this in a php Extension?
body: <p>For example this method of <code>Dataset</code> object returns <code>NULL</code>, How do I make it to return <code>$this</code></p>
  
  <pre><code>PHP_METHOD(TSet, nextLine)
  {
      TSet *MySet;
      tset_object *obj = (tset_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
      MySet = obj-&gt;DataSet;
      if (MySet != NULL) {
          MySet-&gt;nextLine();
      }
      RETURN_NULL();
  }
  </code></pre>
  
  <p>Tried</p>
  
  <pre><code>zval *object = getThis();
  RETURN_ZVAL(object,false,false);
  </code></pre>
  
  <p>Gave me segfault<br>
  And just to be sure also this</p>
  
  <pre><code>RETURN_ZVAL(getThis(),false,false);
  </code></pre>
  
  <p>With same result</p>