ext/result.h in swift-0.6.1 vs ext/result.h in swift-0.7.0
- old
+ new
@@ -1,17 +1,27 @@
#ifndef SWIFT_RESULT_H
#define SWIFT_RESULT_H
#include "swift.h"
+struct ResultWrapper {
+ dbi::AbstractResult *result;
+ VALUE adapter;
+ bool free;
+};
+
extern VALUE cSwiftResult;
extern VALUE cStringIO;
void init_swift_result();
-void result_free(dbi::AbstractResultSet*);
+
+void result_free(ResultWrapper *);
+void result_mark(ResultWrapper *);
+
+VALUE result_wrap_handle(VALUE, VALUE, dbi::AbstractResult *, bool free);
+dbi::AbstractResult* result_handle(VALUE);
+
VALUE result_each(VALUE);
-dbi::AbstractResultSet* result_handle(VALUE);
-VALUE typecast_field(int, const char*, uint64_t);
-VALUE typecast_datetime(const char*, uint64_t);
+VALUE typecast_field(int, const char*, uint64_t, const char*);
#endif