Marcelo Giovane escreveu:
> estou utilizando o xHarbour e sua interface c.
> 
> HB_FUNC (PQNOTIFIES)
> {
>    PGnotify *notify;
>    PQconsumeInput(( PGconn * ) hb_parptr(1));
>    notify = PQnotifies(( PGconn * ) hb_parptr(1));
>    hb_retc( notify->relname );
>    PQfreemem(notify);
> }
> 
> Isso está correto e deveria funcionar.
> 
> Contudo, se faço referência ao membro, apesar de compilar, apresenta erro de 
> execução.
> 
Qual erro? Capturou um backtrace?

Sinceramente não entendo xHarbour, mas você deve alterar o código para:

HB_FUNC (PQNOTIFIES)
{
    PGnotify *notify;
    PQconsumeInput(( PGconn * ) hb_parptr(1));
    notify = PQnotifies(( PGconn * ) hb_parptr(1));
    if (notify != NULL) {
      hb_retc( notify->relname );
      PQfreemem(notify);
    }
}

Talvez você tenha que perguntar em uma lista especializada em xHarbour.


-- 
   Euler Taveira de Oliveira
   http://www.timbira.com/
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a