Skip to content

Commit

Permalink
Added changes to the language setup, provided by fperrad++
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrod committed Dec 5, 2009
1 parent c246251 commit 3606e26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/ops/fun.ops
Expand Up @@ -59,14 +59,14 @@ inline op strftime(out STR, in STR, in PMC) :base_core {
inline op mktime(out INT, in PMC) :base_core {
struct tm timeinfo;

timeinfo.tm_sec = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 0));
timeinfo.tm_min = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 1));
timeinfo.tm_hour = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 2));
timeinfo.tm_mday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 3));
timeinfo.tm_mon = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 4)) - 1;
timeinfo.tm_year = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 5)) - 1900;
timeinfo.tm_wday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 6));
timeinfo.tm_yday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 7));
timeinfo.tm_sec = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 0));
timeinfo.tm_min = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 1));
timeinfo.tm_hour = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 2));
timeinfo.tm_mday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 3));
timeinfo.tm_mon = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 4)) - 1;
timeinfo.tm_year = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 5)) - 1900;
timeinfo.tm_wday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 6));
timeinfo.tm_yday = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 7));
timeinfo.tm_isdst = VTABLE_get_integer(interp, VTABLE_get_pmc_keyed_int(interp, $2, 8));

$1 = mktime(&timeinfo);
Expand Down
3 changes: 2 additions & 1 deletion src/pmc/char.pmc
Expand Up @@ -30,7 +30,8 @@ Class method to construct an Integer from the string representation C<rep>.
}

VTABLE void set_integer_same(PMC *value) {
SELF.set_integer_native(VTABLE_get_integer(INTERP, value));
/*SELF.set_integer_native(VTABLE_get_integer(INTERP, value));*/
SET_ATTR_iv(INTERP, SELF, VTABLE_get_integer(INTERP, value));
}


Expand Down

0 comments on commit 3606e26

Please sign in to comment.