77#include "pg.h"
88
99VALUE rb_cPGresult ;
10- static VALUE sym_symbol , sym_string , sym_static_symbol ;
10+ static VALUE sym_symbol , sym_string ;
1111
1212static VALUE pgresult_type_map_set ( VALUE , VALUE );
1313static t_pg_result * pgresult_get_this ( VALUE );
@@ -465,9 +465,6 @@ pgresult_get(VALUE self)
465465static VALUE pg_cstr_to_sym (char * cstr , unsigned int flags , int enc_idx )
466466{
467467 VALUE fname ;
468- #ifdef TRUFFLERUBY
469- if ( flags & (PG_RESULT_FIELD_NAMES_SYMBOL | PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ) ){
470- #else
471468 if ( flags & PG_RESULT_FIELD_NAMES_SYMBOL ){
472469 rb_encoding * enc = rb_enc_from_index (enc_idx );
473470 fname = rb_check_symbol_cstr (cstr , strlen (cstr ), enc );
@@ -476,10 +473,6 @@ static VALUE pg_cstr_to_sym(char *cstr, unsigned int flags, int enc_idx)
476473 PG_ENCODING_SET_NOCHECK (fname , enc_idx );
477474 fname = rb_str_intern (fname );
478475 }
479- } else if ( flags & PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ){
480- #endif
481- rb_encoding * enc = rb_enc_from_index (enc_idx );
482- fname = ID2SYM (rb_intern3 (cstr , strlen (cstr ), enc ));
483476 } else {
484477 fname = rb_str_new2 (cstr );
485478 PG_ENCODING_SET_NOCHECK (fname , enc_idx );
@@ -1692,7 +1685,6 @@ pgresult_stream_each_tuple(VALUE self)
16921685 * It can be set to one of:
16931686 * * +:string+ to use String based field names
16941687 * * +:symbol+ to use Symbol based field names
1695- * * +:static_symbol+ to use pinned Symbol (can not be garbage collected) - Don't use this, it will probably be removed in future.
16961688 *
16971689 * The default is retrieved from PG::Connection#field_name_type , which defaults to +:string+ .
16981690 *
@@ -1715,7 +1707,6 @@ pgresult_field_name_type_set(VALUE self, VALUE sym)
17151707
17161708 this -> flags &= ~PG_RESULT_FIELD_NAMES_MASK ;
17171709 if ( sym == sym_symbol ) this -> flags |= PG_RESULT_FIELD_NAMES_SYMBOL ;
1718- else if ( sym == sym_static_symbol ) this -> flags |= PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ;
17191710 else if ( sym == sym_string );
17201711 else rb_raise (rb_eArgError , "invalid argument %+" PRIsVALUE , sym );
17211712
@@ -1736,8 +1727,6 @@ pgresult_field_name_type_get(VALUE self)
17361727 t_pg_result * this = pgresult_get_this (self );
17371728 if ( this -> flags & PG_RESULT_FIELD_NAMES_SYMBOL ){
17381729 return sym_symbol ;
1739- } else if ( this -> flags & PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ){
1740- return sym_static_symbol ;
17411730 } else {
17421731 return sym_string ;
17431732 }
@@ -1748,7 +1737,6 @@ init_pg_result(void)
17481737{
17491738 sym_string = ID2SYM (rb_intern ("string" ));
17501739 sym_symbol = ID2SYM (rb_intern ("symbol" ));
1751- sym_static_symbol = ID2SYM (rb_intern ("static_symbol" ));
17521740
17531741 rb_cPGresult = rb_define_class_under ( rb_mPG , "Result" , rb_cObject );
17541742 rb_undef_alloc_func (rb_cPGresult );
0 commit comments