Commit Graph

9 Commits

Author SHA1 Message Date
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 1720d321e5 Set general global handle for extension registration work
* When calling the register() function there is no frame or globals, so we need
  to set an internal handle external to that.
* This means functions that get wrapped know that there's a global handler for
  exceptions, which just prints to the log. Otherwise they think they're running
  synchronously and write to an invalid exception handling object.
2018-10-23 15:36:35 +01:00
baldurk 9e6a5e692e Keep a reference to python function object in wrapped lambda
* This will rarely be relevant, but it ensures if the function is decref'd and
  the lambda is still alive, that we keep the python object alive until we are
  done with it. The primary case for this is persistent callbacks where the
  module is then reloaded.
2018-10-23 14:23:10 +01:00
baldurk 58de3fa8a5 Walk stackframe to find _renderdoc_internal
* When calling functions in modules, the globals are namespaced to the module
2018-10-18 19:36:21 +01:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 2e74989b69 Allow None when converting std::function types
* It just creates an empty callback
2018-01-01 17:31:22 +00:00
baldurk 4c0347f856 Fix compile errors with python bindings on callbacks with return values 2018-01-01 17:31:21 +00:00
baldurk 9db71b803a Change python wrapping of arrays to be more pythonic, by reference
* Previously we would convert from python to C++ arrays immediately by
  copying, and vice-versa convert TO python immediately by creating a
  new python list by copying.
* This however behaves rather poorly in common situations, e.g.:
  > foo.bar.append(5)
  Would not append 5 to foo.bar, but copy foo.bar to a temporary, append
  5 to it, then destroy it leaving foo.bar untouched.
* Instead we leave the C++ array type as a pointer for as long as we can
  and instead implement the python sequence API as extensions/slots that
  work in-place on the original array.
2017-11-03 16:19:41 +00:00