Commit 658bfb2
Fix get_nested_resource_ptr to accept both str and bytes inputs (#1665)
* Fix get_nested_resource_ptr to accept both str and bytes inputs
The char resource path in get_nested_resource_ptr previously only handled
str inputs via a Cython <str?> cast, which would reject bytes objects.
This updates the logic to explicitly handle str, bytes, and raise a clear
TypeError for other types, enabling users to pass bytes-encoded options
to APIs like nvjitlink and nvvm.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* format
* Adding utf-8 as the byte encoding
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent f3e457e commit 658bfb2
File tree
3 files changed
+21
-3
lines changed- cuda_bindings
- cuda/bindings/_internal
- tests
3 files changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
0 commit comments