Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf911ee6

Browse files
committed
Cleanup
1 parent6259a63 commitf911ee6

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

‎bindings/storage/Resources.cpp‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,34 +52,6 @@ py::class_<BResources>(m, "BResources")
5252
.def("HasResource", py::overload_cast<type_code, int32>(&BResources::HasResource),"",py::arg("type"),py::arg("id"))
5353
.def("HasResource", py::overload_cast<type_code,constchar *>(&BResources::HasResource),"",py::arg("type"),py::arg("name"))
5454
//.def("GetResourceInfo", py::overload_cast<int32, type_code *, int32*, const char * *, size_t *>(&BResources::GetResourceInfo), "", py::arg("byIndex"), py::arg("typeFound"), py::arg("idFound"), py::arg("nameFound"), py::arg("lengthFound"))
55-
/*.def("GetResourceInfo", [](BResources& self, int32 byIndex) {
56-
type_code typeFound;
57-
int32 idFound;
58-
const char* nameFound;
59-
size_t lengthFound;
60-
bool result = self.GetResourceInfo(byIndex, &typeFound, &idFound, &nameFound, &lengthFound);
61-
62-
// Creare una lista Python per contenere i risultati
63-
py::list resultList;
64-
65-
// Iterare attraverso i dati restituiti estrarre ciascun blocco
66-
size_t currentIndex = 0;
67-
while (currentIndex < lengthFound) {
68-
// Trova la lunghezza del blocco corrente
69-
size_t currentBlockLength = strlen(nameFound + currentIndex);
70-
71-
// Estrai il blocco corrente
72-
std::string currentBlock(nameFound + currentIndex, currentBlockLength);
73-
74-
// Aggiungi il blocco alla lista Python
75-
resultList.append(py::bytes(currentBlock));
76-
77-
// Passa al prossimo blocco
78-
currentIndex += currentBlockLength + 1; // +1 per includere il terminatore nullo
79-
}
80-
81-
return py::make_tuple(result, static_cast<int>(typeFound), idFound, resultList);
82-
}, "", py::arg("byIndex"))*/
8355
.def("GetResourceInfo", [](BResources& self, int32 byIndex){
8456
type_code typeFound;
8557
int32 idFound;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp