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 );
@@ -1720,7 +1713,6 @@ pgresult_stream_each_tuple(VALUE self)
17201713 * It can be set to one of:
17211714 * * +:string+ to use String based field names
17221715 * * +:symbol+ to use Symbol based field names
1723- * * +:static_symbol+ to use pinned Symbol (can not be garbage collected) - Don't use this, it will probably be removed in future.
17241716 *
17251717 * The default is retrieved from PG::Connection#field_name_type , which defaults to +:string+ .
17261718 *
@@ -1743,7 +1735,6 @@ pgresult_field_name_type_set(VALUE self, VALUE sym)
17431735
17441736 this -> flags &= ~PG_RESULT_FIELD_NAMES_MASK ;
17451737 if ( sym == sym_symbol ) this -> flags |= PG_RESULT_FIELD_NAMES_SYMBOL ;
1746- else if ( sym == sym_static_symbol ) this -> flags |= PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ;
17471738 else if ( sym == sym_string );
17481739 else rb_raise (rb_eArgError , "invalid argument %+" PRIsVALUE , sym );
17491740
@@ -1764,8 +1755,6 @@ pgresult_field_name_type_get(VALUE self)
17641755 t_pg_result * this = pgresult_get_this (self );
17651756 if ( this -> flags & PG_RESULT_FIELD_NAMES_SYMBOL ){
17661757 return sym_symbol ;
1767- } else if ( this -> flags & PG_RESULT_FIELD_NAMES_STATIC_SYMBOL ){
1768- return sym_static_symbol ;
17691758 } else {
17701759 return sym_string ;
17711760 }
@@ -1776,7 +1765,6 @@ init_pg_result(void)
17761765{
17771766 sym_string = ID2SYM (rb_intern ("string" ));
17781767 sym_symbol = ID2SYM (rb_intern ("symbol" ));
1779- sym_static_symbol = ID2SYM (rb_intern ("static_symbol" ));
17801768
17811769 rb_cPGresult = rb_define_class_under ( rb_mPG , "Result" , rb_cObject );
17821770 rb_undef_alloc_func (rb_cPGresult );
0 commit comments