diff options
author | Ben Ashbaugh <ben.ashbaugh@intel.com> | 2021-06-21 10:52:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 10:52:29 -0700 |
commit | 99dec4514bf18f8079f5560468dbb84ca7c3a523 (patch) | |
tree | bbfd68aeb00f20c231ffba25a19d865886a9b3fc | |
parent | 9b5e3849b49a1448996c8b96ba086cd774d987db (diff) | |
download | OpenCL-ICD-Loader-99dec4514bf18f8079f5560468dbb84ca7c3a523.tar.gz OpenCL-ICD-Loader-99dec4514bf18f8079f5560468dbb84ca7c3a523.tar.bz2 OpenCL-ICD-Loader-99dec4514bf18f8079f5560468dbb84ca7c3a523.zip |
update ICD loader generation scripts to handle empty arguments (#150)
-rw-r--r-- | scripts/gen/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/gen/__init__.py b/scripts/gen/__init__.py index 167a430..3cae3f6 100644 --- a/scripts/gen/__init__.py +++ b/scripts/gen/__init__.py @@ -92,6 +92,12 @@ def get_apisigs(spec): ptypeend = ptypeend.strip() pname = pname.strip() plist.append(ApiParam(ptype, ptypeend, pname)) + + # For an empty parameter list (for e.g. clUnloadCompiler), add a single + # unnamed void parameter to make generation easier. + if len(plist) == 0: + plist.append(ApiParam("void", "", "")) + apisigs[name] = ApiSignature(name, ret, plist, suffix) return apisigs |