~ubuntu-branches/ubuntu/vivid/nqp/vivid

« back to all changes in this revision

Viewing changes to src/6model/reprs/P6num.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-06-08 14:57:52 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120608145752-ziumy2rhxboeuf3r
Tags: 0.1~2012.04.1-1
* New upstream release
* Bump required parrot version
* Refresh patches
* Bump upstream copyright years for dyncall
* Use dh_parrot debhelper plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
    return spec;
114
114
}
115
115
 
 
116
/* Serializes the data. */
 
117
static void serialize(PARROT_INTERP, STable *st, void *data, SerializationWriter *writer) {
 
118
    writer->write_num(interp, writer, ((P6numBody *)data)->value);
 
119
}
 
120
 
 
121
/* Deserializes the data. */
 
122
static void deserialize(PARROT_INTERP, STable *st, void *data, SerializationReader *reader) {
 
123
    ((P6numBody *)data)->value = reader->read_num(interp, reader);
 
124
}
 
125
 
116
126
/* Initializes the P6num representation. */
117
127
REPROps * P6num_initialize(PARROT_INTERP) {
118
128
    /* Allocate and populate the representation function table. */
131
141
    this_repr->box_funcs->get_boxed_ref = get_boxed_ref;
132
142
    this_repr->gc_free = gc_free;
133
143
    this_repr->get_storage_spec = get_storage_spec;
 
144
    this_repr->serialize = serialize;
 
145
    this_repr->deserialize = deserialize;
134
146
    return this_repr;
135
147
}