Posted to tcl by emiliano at Thu Apr 24 20:16:37 GMT 2025view raw

  1. Index: win/tkWinGDI.c
  2. ==================================================================
  3. --- win/tkWinGDI.c
  4. +++ win/tkWinGDI.c
  5. @@ -3654,15 +3654,13 @@
  6. * Store print properties and link variables so they can be accessed from
  7. * script level.
  8. */
  9. if (localPrinterName != NULL) {
  10. char* varlink1 = (char*)ckalloc(100 * sizeof(char));
  11. - char** varlink2 = (char**)ckalloc(sizeof(char*));
  12. - *varlink2 = varlink1;
  13. WideCharToMultiByte(CP_UTF8, 0, localPrinterName, -1, varlink1, 0, NULL, NULL);
  14.  
  15. - Tcl_LinkVar(interp, "::tk::print::printer_name", varlink2,
  16. + Tcl_LinkVar(interp, "::tk::print::printer_name", varlink1,
  17. TCL_LINK_STRING | TCL_LINK_READ_ONLY);
  18. Tcl_LinkVar(interp, "::tk::print::copies", &copies,
  19. TCL_LINK_INT | TCL_LINK_READ_ONLY);
  20. Tcl_LinkVar(interp, "::tk::print::dpi_x", &dpi_x,
  21. TCL_LINK_INT | TCL_LINK_READ_ONLY);
  22.  

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week