]> git.draconx.ca Git - gob-dx.git/blobdiff - examples/my-person.gob
Release 0.92.4
[gob-dx.git] / examples / my-person.gob
index abf1d0146b727b97e187c897ba0702ec520f8857..f09b1511ae205a005ecbc213e18a892284389736 100644 (file)
@@ -1,3 +1,5 @@
+require 0.92.1
+
 %{
 #include <time.h>
 #include "my-person.h"
@@ -11,7 +13,7 @@ class My:Person from Gtk:Object {
 
        private int rounds_in_shotgun; /* number of rounds in our shotgun */
 
-       argument POINTER name
+       argument POINTER (type char *) name
        get {
                if(self->name)
                        ARG = g_strdup(self->name);
@@ -29,14 +31,14 @@ class My:Person from Gtk:Object {
        argument LONG dob get { ARG = self->dob; } set { self->dob = ARG; };
        argument LONG dod get { ARG = self->dod; } set { self->dod = ARG; };
 
-       init(person)
+       init(self)
        {
-               person->name = g_strdup("Nobody");
-               person->dob = 0;
-               person->dod = 0;
+               self->name = g_strdup("Nobody");
+               self->dob = 0;
+               self->dod = 0;
                
                /* initially we have no rounds in the shotgun */
-               person->_priv->rounds_in_shotgun = 0;
+               self->_priv->rounds_in_shotgun = 0;
        }
 
        /* when the person gets born, sends out a signal, the caller