diff options
| author | Daniel Farina <daniel@fdr.io> | 2013-05-27 09:52:56 -0700 |
|---|---|---|
| committer | Daniel Farina <daniel@fdr.io> | 2013-05-27 10:02:48 -0700 |
| commit | 379460558b2dfd7ddbd0b29abfaa2642d9f0961e (patch) | |
| tree | c7ee77aced192dff18c0f2676d784f0e5cfe2372 /src/rt/rust_builtin.cpp | |
| parent | 3941f78a1bfb3ecf077dd782e5d03ea7fafcad86 (diff) | |
| download | rust-379460558b2dfd7ddbd0b29abfaa2642d9f0961e.tar.gz rust-379460558b2dfd7ddbd0b29abfaa2642d9f0961e.zip | |
Use passing by-value in gmtime, mktime
Per the recommendation of the now-removed FIXME.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index a2f253550af..b0a46d2ac29 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -459,18 +459,18 @@ rust_localtime(int64_t sec, int32_t nsec, rust_tm *timeptr) { tm_to_rust_tm(&tm, timeptr, gmtoff, zone, nsec); } -extern "C" CDECL void -rust_timegm(rust_tm* timeptr, int64_t *out) { +extern "C" CDECL int64_t +rust_timegm(rust_tm* timeptr) { tm t; rust_tm_to_tm(timeptr, &t); - *out = TIMEGM(&t); + return TIMEGM(&t); } -extern "C" CDECL void -rust_mktime(rust_tm* timeptr, int64_t *out) { +extern "C" CDECL int64_t +rust_mktime(rust_tm* timeptr) { tm t; rust_tm_to_tm(timeptr, &t); - *out = mktime(&t); + return mktime(&t); } extern "C" CDECL rust_sched_id |
