Skip to content

Commit a63efbe

Browse files
committed
Mark alloc as undefined for TinyTds::Result
From my understanding, you only need to define an `alloc` function if you want to define a C struct and store values on it. For example, `TinyTds::Client` defines such an `allocate` function to wrap its client. On `TinyTds::Result`, it does not seem we do have a struct and therefore does not need an `alloc` function.
1 parent fd0877b commit a63efbe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Add Ruby 3.0 to the cross compile list
44
* Fix segfault when asking if client was dead after closing it. Fixes #519.
5+
* Mark `alloc` function as undefined on `TinyTds::Result`. Fixes #515.
56

67
## 2.1.5
78

ext/tiny_tds/result.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ void init_tinytds_result() {
584584
cDate = rb_const_get(rb_cObject, rb_intern("Date"));
585585
/* Define TinyTds::Result */
586586
cTinyTdsResult = rb_define_class_under(mTinyTds, "Result", rb_cObject);
587+
rb_undef_alloc_func(cTinyTdsResult);
587588
/* Define TinyTds::Result Public Methods */
588589
rb_define_method(cTinyTdsResult, "fields", rb_tinytds_result_fields, 0);
589590
rb_define_method(cTinyTdsResult, "each", rb_tinytds_result_each, -1);

0 commit comments

Comments
 (0)