Index: runtime/parrot/library/libpcre.pir =================================================================== --- runtime/parrot/library/libpcre.pir (revision 49024) +++ runtime/parrot/library/libpcre.pir (working copy) @@ -19,36 +19,31 @@ .param string pat .param int options - .local string error .local pmc PCRE_NCI_compile - .local int error_size .local pmc NULL null NULL + .local pmc errstr_p + errstr_p = new ['Pointer'] + .local pmc errptr errptr= new 'Integer' - ## error message string size - error_size= 500 - - ## allocate space in string for error message - repeat error, " ", error_size - PCRE_NCI_compile = get_hll_global ['PCRE'; 'NCI'], 'PCRE_compile' .local pmc code - code = PCRE_NCI_compile( pat, options, error, errptr, NULL ) + code = PCRE_NCI_compile( pat, options, errstr_p, errptr, NULL ) .local int is_code_defined + .local string errstr is_code_defined = defined code - unless is_code_defined goto RETURN + if is_code_defined goto RETURN + errstr = errstr_p - error = "" - RETURN: - .return( code, error, errptr ) + .return( code, errstr, errptr ) .end