Re: Changed Behaviour on Tcl_Alloc in tcl9, howto port ?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Changed Behaviour on Tcl_Alloc in tcl9, howto port ?
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 04. Oct 2024, 13:33:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdonav$7joa$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Michael Niehren <michael@niehren.de> wrote:
Hi,
 
i am trying to port an C-Module to tcl9. In the module there has been used a
call to Tcl_Alloc to allocate memory for an char* variable dest_buf.
  dest_buf = Tcl_Alloc(dest_size);
 
Now on tcl9 Tcl_Alloc has an return type of void, on tcl8 it has char*, so i
got the error: error: invalid conversion from ‘void*’ to ‘char*’
 
I did not find something about that in the migration guide.
 
Any ideas for resovling this issue ?

Possibly casting the void pointer to char*?:

  dest_buf = (char*)Tcl_Alloc(dest_size);


Date Sujet#  Auteur
4 Oct 24 o Re: Changed Behaviour on Tcl_Alloc in tcl9, howto port ?1Rich

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal