• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
    • RDF quality heuristics
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.3.2 Other foreign interface types
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Interface Data Types
          • Other foreign interface types
            • PL_ARITY_AS_SIZE
    • Packages

12.3.2.1 PL_ARITY_AS_SIZE

As of SWI-Prolog 7.3.12, the arity of terms has changed from int to size_t. To deal with this transition, all affecting functions have two versions, where the old name exchanges the arity as int and a new function with name *_sz() exchanges the arity as size_t. Op to 8.1.28, the default was to use the old int functions. As of 8.1.29/8.2.x, the default is to use size_t and the old behaviour can be restored by defining PL_ARITY_AS_SIZE to 0 (zero). This makes old code compatible, but the following warning is printed when compiling:

#warning "Term arity has changed from int to size_t."
#warning "Please update your code or use #define PL_ARITY_AS_SIZE 0."

To make the code compile silently again, change the types you use to represent arity from int to size_t. Please be aware that size_t is unsigned. At some point representing arity as int will be dropped completely.

ClioPatria (version V3.1.1-40-g9d9e003)