Changeset 7570 for lang/perl/Text-MeCab

Show
Ignore:
Timestamp:
03/06/08 19:19:33 (7 years ago)
Author:
daisuke
Message:

use sv_setref_pv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Text-MeCab/trunk/text-mecab.h

    r4156 r7570  
    1212#define NEED_newRV_noinc 
    1313#define NEED_sv_2pv_nolen 
     14#define NEED_sv_2pv_flags 
    1415#include "ppport.h" 
    1516#include <mecab.h> 
     
    2324 
    2425#define XS_STRUCT2OBJ(sv, class, obj) \ 
    25     sv = newSViv(PTR2IV(obj));  \ 
    26     sv = newRV_noinc(sv); \ 
    27     sv_bless(sv, gv_stashpv(class, 1)); \ 
    28     SvREADONLY_on(sv); 
     26        sv_setref_pv(sv, class, (void *) obj); 
    2927 
    3028typedef mecab_t      TextMeCab;