| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558 |
- /*[clinic input]
- output preset block
- [clinic start generated code]*/
- /*[clinic end generated code: output=da39a3ee5e6b4b0d input=3c81ac2402d06a8b]*/
- /*[clinic input]
- test_object_converter
- a: object
- b: object(converter="PyUnicode_FSConverter")
- c: object(subclass_of="&PyUnicode_Type")
- d: object(type="PyUnicode_Object *")
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_object_converter__doc__,
- "test_object_converter($module, a, b, c, d, /)\n"
- "--\n"
- "\n");
- #define TEST_OBJECT_CONVERTER_METHODDEF \
- {"test_object_converter", _PyCFunction_CAST(test_object_converter), METH_FASTCALL, test_object_converter__doc__},
- static PyObject *
- test_object_converter_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyUnicode_Object *d);
- static PyObject *
- test_object_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- PyObject *a;
- PyObject *b;
- PyObject *c;
- PyUnicode_Object *d;
- if (!_PyArg_CheckPositional("test_object_converter", nargs, 4, 4)) {
- goto exit;
- }
- a = args[0];
- if (!PyUnicode_FSConverter(args[1], &b)) {
- goto exit;
- }
- if (!PyUnicode_Check(args[2])) {
- _PyArg_BadArgument("test_object_converter", "argument 3", "str", args[2]);
- goto exit;
- }
- c = args[2];
- d = (PyUnicode_Object *)args[3];
- return_value = test_object_converter_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_object_converter_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyUnicode_Object *d)
- /*[clinic end generated code: output=886f4f9b598726b6 input=005e6a8a711a869b]*/
- /*[clinic input]
- test_object_converter_one_arg
- a: object
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_object_converter_one_arg__doc__,
- "test_object_converter_one_arg($module, a, /)\n"
- "--\n"
- "\n");
- #define TEST_OBJECT_CONVERTER_ONE_ARG_METHODDEF \
- {"test_object_converter_one_arg", (PyCFunction)test_object_converter_one_arg, METH_O, test_object_converter_one_arg__doc__},
- static PyObject *
- test_object_converter_one_arg(PyObject *module, PyObject *a)
- /*[clinic end generated code: output=6da755f8502139df input=d635d92a421f1ca3]*/
- /*[clinic input]
- test_objects_converter
- a: object
- b: object = NULL
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_objects_converter__doc__,
- "test_objects_converter($module, a, b=<unrepresentable>, /)\n"
- "--\n"
- "\n");
- #define TEST_OBJECTS_CONVERTER_METHODDEF \
- {"test_objects_converter", _PyCFunction_CAST(test_objects_converter), METH_FASTCALL, test_objects_converter__doc__},
- static PyObject *
- test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b);
- static PyObject *
- test_objects_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- PyObject *a;
- PyObject *b = NULL;
- if (!_PyArg_CheckPositional("test_objects_converter", nargs, 1, 2)) {
- goto exit;
- }
- a = args[0];
- if (nargs < 2) {
- goto skip_optional;
- }
- b = args[1];
- skip_optional:
- return_value = test_objects_converter_impl(module, a, b);
- exit:
- return return_value;
- }
- static PyObject *
- test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
- /*[clinic end generated code: output=fc26328b79d46bb7 input=4cbb3d9edd2a36f3]*/
- /*[clinic input]
- test_object_converter_subclass_of
- a: object(subclass_of="&PyLong_Type")
- b: object(subclass_of="&PyTuple_Type")
- c: object(subclass_of="&PyList_Type")
- d: object(subclass_of="&PySet_Type")
- e: object(subclass_of="&PyFrozenSet_Type")
- f: object(subclass_of="&PyDict_Type")
- g: object(subclass_of="&PyUnicode_Type")
- h: object(subclass_of="&PyBytes_Type")
- i: object(subclass_of="&PyByteArray_Type")
- j: object(subclass_of="&MyType")
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_object_converter_subclass_of__doc__,
- "test_object_converter_subclass_of($module, a, b, c, d, e, f, g, h, i,\n"
- " j, /)\n"
- "--\n"
- "\n");
- #define TEST_OBJECT_CONVERTER_SUBCLASS_OF_METHODDEF \
- {"test_object_converter_subclass_of", _PyCFunction_CAST(test_object_converter_subclass_of), METH_FASTCALL, test_object_converter_subclass_of__doc__},
- static PyObject *
- test_object_converter_subclass_of_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d,
- PyObject *e, PyObject *f, PyObject *g,
- PyObject *h, PyObject *i, PyObject *j);
- static PyObject *
- test_object_converter_subclass_of(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- PyObject *a;
- PyObject *b;
- PyObject *c;
- PyObject *d;
- PyObject *e;
- PyObject *f;
- PyObject *g;
- PyObject *h;
- PyObject *i;
- PyObject *j;
- if (!_PyArg_CheckPositional("test_object_converter_subclass_of", nargs, 10, 10)) {
- goto exit;
- }
- if (!PyLong_Check(args[0])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 1", "int", args[0]);
- goto exit;
- }
- a = args[0];
- if (!PyTuple_Check(args[1])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 2", "tuple", args[1]);
- goto exit;
- }
- b = args[1];
- if (!PyList_Check(args[2])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 3", "list", args[2]);
- goto exit;
- }
- c = args[2];
- if (!PySet_Check(args[3])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 4", "set", args[3]);
- goto exit;
- }
- d = args[3];
- if (!PyFrozenSet_Check(args[4])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 5", "frozenset", args[4]);
- goto exit;
- }
- e = args[4];
- if (!PyDict_Check(args[5])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 6", "dict", args[5]);
- goto exit;
- }
- f = args[5];
- if (!PyUnicode_Check(args[6])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 7", "str", args[6]);
- goto exit;
- }
- g = args[6];
- if (!PyBytes_Check(args[7])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 8", "bytes", args[7]);
- goto exit;
- }
- h = args[7];
- if (!PyByteArray_Check(args[8])) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 9", "bytearray", args[8]);
- goto exit;
- }
- i = args[8];
- if (!PyObject_TypeCheck(args[9], &MyType)) {
- _PyArg_BadArgument("test_object_converter_subclass_of", "argument 10", (&MyType)->tp_name, args[9]);
- goto exit;
- }
- j = args[9];
- return_value = test_object_converter_subclass_of_impl(module, a, b, c, d, e, f, g, h, i, j);
- exit:
- return return_value;
- }
- static PyObject *
- test_object_converter_subclass_of_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d,
- PyObject *e, PyObject *f, PyObject *g,
- PyObject *h, PyObject *i, PyObject *j)
- /*[clinic end generated code: output=e4b07c9a54479a40 input=31b06b772d5f983e]*/
- /*[clinic input]
- test_PyBytesObject_converter
- a: PyBytesObject
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_PyBytesObject_converter__doc__,
- "test_PyBytesObject_converter($module, a, /)\n"
- "--\n"
- "\n");
- #define TEST_PYBYTESOBJECT_CONVERTER_METHODDEF \
- {"test_PyBytesObject_converter", (PyCFunction)test_PyBytesObject_converter, METH_O, test_PyBytesObject_converter__doc__},
- static PyObject *
- test_PyBytesObject_converter_impl(PyObject *module, PyBytesObject *a);
- static PyObject *
- test_PyBytesObject_converter(PyObject *module, PyObject *arg)
- {
- PyObject *return_value = NULL;
- PyBytesObject *a;
- if (!PyBytes_Check(arg)) {
- _PyArg_BadArgument("test_PyBytesObject_converter", "argument", "bytes", arg);
- goto exit;
- }
- a = (PyBytesObject *)arg;
- return_value = test_PyBytesObject_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_PyBytesObject_converter_impl(PyObject *module, PyBytesObject *a)
- /*[clinic end generated code: output=7539d628e6fceace input=12b10c7cb5750400]*/
- /*[clinic input]
- test_PyByteArrayObject_converter
- a: PyByteArrayObject
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_PyByteArrayObject_converter__doc__,
- "test_PyByteArrayObject_converter($module, a, /)\n"
- "--\n"
- "\n");
- #define TEST_PYBYTEARRAYOBJECT_CONVERTER_METHODDEF \
- {"test_PyByteArrayObject_converter", (PyCFunction)test_PyByteArrayObject_converter, METH_O, test_PyByteArrayObject_converter__doc__},
- static PyObject *
- test_PyByteArrayObject_converter_impl(PyObject *module, PyByteArrayObject *a);
- static PyObject *
- test_PyByteArrayObject_converter(PyObject *module, PyObject *arg)
- {
- PyObject *return_value = NULL;
- PyByteArrayObject *a;
- if (!PyByteArray_Check(arg)) {
- _PyArg_BadArgument("test_PyByteArrayObject_converter", "argument", "bytearray", arg);
- goto exit;
- }
- a = (PyByteArrayObject *)arg;
- return_value = test_PyByteArrayObject_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_PyByteArrayObject_converter_impl(PyObject *module, PyByteArrayObject *a)
- /*[clinic end generated code: output=1245af9f5b3e355e input=5a657da535d194ae]*/
- /*[clinic input]
- test_unicode_converter
- a: unicode
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unicode_converter__doc__,
- "test_unicode_converter($module, a, /)\n"
- "--\n"
- "\n");
- #define TEST_UNICODE_CONVERTER_METHODDEF \
- {"test_unicode_converter", (PyCFunction)test_unicode_converter, METH_O, test_unicode_converter__doc__},
- static PyObject *
- test_unicode_converter_impl(PyObject *module, PyObject *a);
- static PyObject *
- test_unicode_converter(PyObject *module, PyObject *arg)
- {
- PyObject *return_value = NULL;
- PyObject *a;
- if (!PyUnicode_Check(arg)) {
- _PyArg_BadArgument("test_unicode_converter", "argument", "str", arg);
- goto exit;
- }
- if (PyUnicode_READY(arg) == -1) {
- goto exit;
- }
- a = arg;
- return_value = test_unicode_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_unicode_converter_impl(PyObject *module, PyObject *a)
- /*[clinic end generated code: output=18f1e3880c862611 input=aa33612df92aa9c5]*/
- /*[clinic input]
- test_bool_converter
- a: bool = True
- b: bool(accept={object}) = True
- c: bool(accept={int}) = True
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_bool_converter__doc__,
- "test_bool_converter($module, a=True, b=True, c=True, /)\n"
- "--\n"
- "\n");
- #define TEST_BOOL_CONVERTER_METHODDEF \
- {"test_bool_converter", _PyCFunction_CAST(test_bool_converter), METH_FASTCALL, test_bool_converter__doc__},
- static PyObject *
- test_bool_converter_impl(PyObject *module, int a, int b, int c);
- static PyObject *
- test_bool_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- int a = 1;
- int b = 1;
- int c = 1;
- if (!_PyArg_CheckPositional("test_bool_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- a = PyObject_IsTrue(args[0]);
- if (a < 0) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- b = PyObject_IsTrue(args[1]);
- if (b < 0) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- c = _PyLong_AsInt(args[2]);
- if (c == -1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_bool_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_bool_converter_impl(PyObject *module, int a, int b, int c)
- /*[clinic end generated code: output=27f0e653a70b9be3 input=939854fa9f248c60]*/
- /*[clinic input]
- test_char_converter
- a: char = b'A'
- b: char = b'\a'
- c: char = b'\b'
- d: char = b'\t'
- e: char = b'\n'
- f: char = b'\v'
- g: char = b'\f'
- h: char = b'\r'
- i: char = b'"'
- j: char = b"'"
- k: char = b'?'
- l: char = b'\\'
- m: char = b'\000'
- n: char = b'\377'
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_char_converter__doc__,
- "test_char_converter($module, a=b\'A\', b=b\'\\x07\', c=b\'\\x08\', d=b\'\\t\',\n"
- " e=b\'\\n\', f=b\'\\x0b\', g=b\'\\x0c\', h=b\'\\r\', i=b\'\"\',\n"
- " j=b\"\'\", k=b\'?\', l=b\'\\\\\', m=b\'\\x00\', n=b\'\\xff\', /)\n"
- "--\n"
- "\n");
- #define TEST_CHAR_CONVERTER_METHODDEF \
- {"test_char_converter", _PyCFunction_CAST(test_char_converter), METH_FASTCALL, test_char_converter__doc__},
- static PyObject *
- test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
- char e, char f, char g, char h, char i, char j,
- char k, char l, char m, char n);
- static PyObject *
- test_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- char a = 'A';
- char b = '\x07';
- char c = '\x08';
- char d = '\t';
- char e = '\n';
- char f = '\x0b';
- char g = '\x0c';
- char h = '\r';
- char i = '"';
- char j = '\'';
- char k = '?';
- char l = '\\';
- char m = '\x00';
- char n = '\xff';
- if (!_PyArg_CheckPositional("test_char_converter", nargs, 0, 14)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[0]) && PyBytes_GET_SIZE(args[0]) == 1) {
- a = PyBytes_AS_STRING(args[0])[0];
- }
- else if (PyByteArray_Check(args[0]) && PyByteArray_GET_SIZE(args[0]) == 1) {
- a = PyByteArray_AS_STRING(args[0])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 1", "a byte string of length 1", args[0]);
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[1]) && PyBytes_GET_SIZE(args[1]) == 1) {
- b = PyBytes_AS_STRING(args[1])[0];
- }
- else if (PyByteArray_Check(args[1]) && PyByteArray_GET_SIZE(args[1]) == 1) {
- b = PyByteArray_AS_STRING(args[1])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 2", "a byte string of length 1", args[1]);
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[2]) && PyBytes_GET_SIZE(args[2]) == 1) {
- c = PyBytes_AS_STRING(args[2])[0];
- }
- else if (PyByteArray_Check(args[2]) && PyByteArray_GET_SIZE(args[2]) == 1) {
- c = PyByteArray_AS_STRING(args[2])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 3", "a byte string of length 1", args[2]);
- goto exit;
- }
- if (nargs < 4) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[3]) && PyBytes_GET_SIZE(args[3]) == 1) {
- d = PyBytes_AS_STRING(args[3])[0];
- }
- else if (PyByteArray_Check(args[3]) && PyByteArray_GET_SIZE(args[3]) == 1) {
- d = PyByteArray_AS_STRING(args[3])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 4", "a byte string of length 1", args[3]);
- goto exit;
- }
- if (nargs < 5) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[4]) && PyBytes_GET_SIZE(args[4]) == 1) {
- e = PyBytes_AS_STRING(args[4])[0];
- }
- else if (PyByteArray_Check(args[4]) && PyByteArray_GET_SIZE(args[4]) == 1) {
- e = PyByteArray_AS_STRING(args[4])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 5", "a byte string of length 1", args[4]);
- goto exit;
- }
- if (nargs < 6) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[5]) && PyBytes_GET_SIZE(args[5]) == 1) {
- f = PyBytes_AS_STRING(args[5])[0];
- }
- else if (PyByteArray_Check(args[5]) && PyByteArray_GET_SIZE(args[5]) == 1) {
- f = PyByteArray_AS_STRING(args[5])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 6", "a byte string of length 1", args[5]);
- goto exit;
- }
- if (nargs < 7) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[6]) && PyBytes_GET_SIZE(args[6]) == 1) {
- g = PyBytes_AS_STRING(args[6])[0];
- }
- else if (PyByteArray_Check(args[6]) && PyByteArray_GET_SIZE(args[6]) == 1) {
- g = PyByteArray_AS_STRING(args[6])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 7", "a byte string of length 1", args[6]);
- goto exit;
- }
- if (nargs < 8) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[7]) && PyBytes_GET_SIZE(args[7]) == 1) {
- h = PyBytes_AS_STRING(args[7])[0];
- }
- else if (PyByteArray_Check(args[7]) && PyByteArray_GET_SIZE(args[7]) == 1) {
- h = PyByteArray_AS_STRING(args[7])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 8", "a byte string of length 1", args[7]);
- goto exit;
- }
- if (nargs < 9) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[8]) && PyBytes_GET_SIZE(args[8]) == 1) {
- i = PyBytes_AS_STRING(args[8])[0];
- }
- else if (PyByteArray_Check(args[8]) && PyByteArray_GET_SIZE(args[8]) == 1) {
- i = PyByteArray_AS_STRING(args[8])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 9", "a byte string of length 1", args[8]);
- goto exit;
- }
- if (nargs < 10) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[9]) && PyBytes_GET_SIZE(args[9]) == 1) {
- j = PyBytes_AS_STRING(args[9])[0];
- }
- else if (PyByteArray_Check(args[9]) && PyByteArray_GET_SIZE(args[9]) == 1) {
- j = PyByteArray_AS_STRING(args[9])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 10", "a byte string of length 1", args[9]);
- goto exit;
- }
- if (nargs < 11) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[10]) && PyBytes_GET_SIZE(args[10]) == 1) {
- k = PyBytes_AS_STRING(args[10])[0];
- }
- else if (PyByteArray_Check(args[10]) && PyByteArray_GET_SIZE(args[10]) == 1) {
- k = PyByteArray_AS_STRING(args[10])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 11", "a byte string of length 1", args[10]);
- goto exit;
- }
- if (nargs < 12) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[11]) && PyBytes_GET_SIZE(args[11]) == 1) {
- l = PyBytes_AS_STRING(args[11])[0];
- }
- else if (PyByteArray_Check(args[11]) && PyByteArray_GET_SIZE(args[11]) == 1) {
- l = PyByteArray_AS_STRING(args[11])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 12", "a byte string of length 1", args[11]);
- goto exit;
- }
- if (nargs < 13) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[12]) && PyBytes_GET_SIZE(args[12]) == 1) {
- m = PyBytes_AS_STRING(args[12])[0];
- }
- else if (PyByteArray_Check(args[12]) && PyByteArray_GET_SIZE(args[12]) == 1) {
- m = PyByteArray_AS_STRING(args[12])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 13", "a byte string of length 1", args[12]);
- goto exit;
- }
- if (nargs < 14) {
- goto skip_optional;
- }
- if (PyBytes_Check(args[13]) && PyBytes_GET_SIZE(args[13]) == 1) {
- n = PyBytes_AS_STRING(args[13])[0];
- }
- else if (PyByteArray_Check(args[13]) && PyByteArray_GET_SIZE(args[13]) == 1) {
- n = PyByteArray_AS_STRING(args[13])[0];
- }
- else {
- _PyArg_BadArgument("test_char_converter", "argument 14", "a byte string of length 1", args[13]);
- goto exit;
- }
- skip_optional:
- return_value = test_char_converter_impl(module, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
- exit:
- return return_value;
- }
- static PyObject *
- test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
- char e, char f, char g, char h, char i, char j,
- char k, char l, char m, char n)
- /*[clinic end generated code: output=98589f02422fe6b1 input=e42330417a44feac]*/
- /*[clinic input]
- test_unsigned_char_converter
- a: unsigned_char = 12
- b: unsigned_char(bitwise=False) = 34
- c: unsigned_char(bitwise=True) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unsigned_char_converter__doc__,
- "test_unsigned_char_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_UNSIGNED_CHAR_CONVERTER_METHODDEF \
- {"test_unsigned_char_converter", _PyCFunction_CAST(test_unsigned_char_converter), METH_FASTCALL, test_unsigned_char_converter__doc__},
- static PyObject *
- test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
- unsigned char b, unsigned char c);
- static PyObject *
- test_unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- unsigned char a = 12;
- unsigned char b = 34;
- unsigned char c = 56;
- if (!_PyArg_CheckPositional("test_unsigned_char_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- {
- long ival = PyLong_AsLong(args[0]);
- if (ival == -1 && PyErr_Occurred()) {
- goto exit;
- }
- else if (ival < 0) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned byte integer is less than minimum");
- goto exit;
- }
- else if (ival > UCHAR_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned byte integer is greater than maximum");
- goto exit;
- }
- else {
- a = (unsigned char) ival;
- }
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- {
- long ival = PyLong_AsLong(args[1]);
- if (ival == -1 && PyErr_Occurred()) {
- goto exit;
- }
- else if (ival < 0) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned byte integer is less than minimum");
- goto exit;
- }
- else if (ival > UCHAR_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "unsigned byte integer is greater than maximum");
- goto exit;
- }
- else {
- b = (unsigned char) ival;
- }
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- {
- unsigned long ival = PyLong_AsUnsignedLongMask(args[2]);
- if (ival == (unsigned long)-1 && PyErr_Occurred()) {
- goto exit;
- }
- else {
- c = (unsigned char) ival;
- }
- }
- skip_optional:
- return_value = test_unsigned_char_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
- unsigned char b, unsigned char c)
- /*[clinic end generated code: output=45920dbedc22eb55 input=021414060993e289]*/
- /*[clinic input]
- test_short_converter
- a: short = 12
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_short_converter__doc__,
- "test_short_converter($module, a=12, /)\n"
- "--\n"
- "\n");
- #define TEST_SHORT_CONVERTER_METHODDEF \
- {"test_short_converter", _PyCFunction_CAST(test_short_converter), METH_FASTCALL, test_short_converter__doc__},
- static PyObject *
- test_short_converter_impl(PyObject *module, short a);
- static PyObject *
- test_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- short a = 12;
- if (!_PyArg_CheckPositional("test_short_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- {
- long ival = PyLong_AsLong(args[0]);
- if (ival == -1 && PyErr_Occurred()) {
- goto exit;
- }
- else if (ival < SHRT_MIN) {
- PyErr_SetString(PyExc_OverflowError,
- "signed short integer is less than minimum");
- goto exit;
- }
- else if (ival > SHRT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "signed short integer is greater than maximum");
- goto exit;
- }
- else {
- a = (short) ival;
- }
- }
- skip_optional:
- return_value = test_short_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_short_converter_impl(PyObject *module, short a)
- /*[clinic end generated code: output=a580945bd6963d45 input=6a8a7a509a498ff4]*/
- /*[clinic input]
- test_unsigned_short_converter
- a: unsigned_short = 12
- b: unsigned_short(bitwise=False) = 34
- c: unsigned_short(bitwise=True) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unsigned_short_converter__doc__,
- "test_unsigned_short_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_UNSIGNED_SHORT_CONVERTER_METHODDEF \
- {"test_unsigned_short_converter", _PyCFunction_CAST(test_unsigned_short_converter), METH_FASTCALL, test_unsigned_short_converter__doc__},
- static PyObject *
- test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
- unsigned short b, unsigned short c);
- static PyObject *
- test_unsigned_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- unsigned short a = 12;
- unsigned short b = 34;
- unsigned short c = 56;
- if (!_PyArg_CheckPositional("test_unsigned_short_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedShort_Converter(args[0], &a)) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedShort_Converter(args[1], &b)) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- c = (unsigned short)PyLong_AsUnsignedLongMask(args[2]);
- if (c == (unsigned short)-1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_unsigned_short_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
- unsigned short b, unsigned short c)
- /*[clinic end generated code: output=e6e990df729114fc input=cdfd8eff3d9176b4]*/
- /*[clinic input]
- test_int_converter
- a: int = 12
- b: int(accept={int}) = 34
- c: int(accept={str}) = 45
- d: int(type='myenum') = 67
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_int_converter__doc__,
- "test_int_converter($module, a=12, b=34, c=45, d=67, /)\n"
- "--\n"
- "\n");
- #define TEST_INT_CONVERTER_METHODDEF \
- {"test_int_converter", _PyCFunction_CAST(test_int_converter), METH_FASTCALL, test_int_converter__doc__},
- static PyObject *
- test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d);
- static PyObject *
- test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- int a = 12;
- int b = 34;
- int c = 45;
- myenum d = 67;
- if (!_PyArg_CheckPositional("test_int_converter", nargs, 0, 4)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- a = _PyLong_AsInt(args[0]);
- if (a == -1 && PyErr_Occurred()) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- b = _PyLong_AsInt(args[1]);
- if (b == -1 && PyErr_Occurred()) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (!PyUnicode_Check(args[2])) {
- _PyArg_BadArgument("test_int_converter", "argument 3", "a unicode character", args[2]);
- goto exit;
- }
- if (PyUnicode_READY(args[2])) {
- goto exit;
- }
- if (PyUnicode_GET_LENGTH(args[2]) != 1) {
- _PyArg_BadArgument("test_int_converter", "argument 3", "a unicode character", args[2]);
- goto exit;
- }
- c = PyUnicode_READ_CHAR(args[2], 0);
- if (nargs < 4) {
- goto skip_optional;
- }
- d = _PyLong_AsInt(args[3]);
- if (d == -1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_int_converter_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
- /*[clinic end generated code: output=800993036e078c07 input=d20541fc1ca0553e]*/
- /*[clinic input]
- test_unsigned_int_converter
- a: unsigned_int = 12
- b: unsigned_int(bitwise=False) = 34
- c: unsigned_int(bitwise=True) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unsigned_int_converter__doc__,
- "test_unsigned_int_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_UNSIGNED_INT_CONVERTER_METHODDEF \
- {"test_unsigned_int_converter", _PyCFunction_CAST(test_unsigned_int_converter), METH_FASTCALL, test_unsigned_int_converter__doc__},
- static PyObject *
- test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
- unsigned int b, unsigned int c);
- static PyObject *
- test_unsigned_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- unsigned int a = 12;
- unsigned int b = 34;
- unsigned int c = 56;
- if (!_PyArg_CheckPositional("test_unsigned_int_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedInt_Converter(args[0], &a)) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedInt_Converter(args[1], &b)) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- c = (unsigned int)PyLong_AsUnsignedLongMask(args[2]);
- if (c == (unsigned int)-1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_unsigned_int_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
- unsigned int b, unsigned int c)
- /*[clinic end generated code: output=f9cdbe410ccc98a3 input=5533534828b62fc0]*/
- /*[clinic input]
- test_long_converter
- a: long = 12
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_long_converter__doc__,
- "test_long_converter($module, a=12, /)\n"
- "--\n"
- "\n");
- #define TEST_LONG_CONVERTER_METHODDEF \
- {"test_long_converter", _PyCFunction_CAST(test_long_converter), METH_FASTCALL, test_long_converter__doc__},
- static PyObject *
- test_long_converter_impl(PyObject *module, long a);
- static PyObject *
- test_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- long a = 12;
- if (!_PyArg_CheckPositional("test_long_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- a = PyLong_AsLong(args[0]);
- if (a == -1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_long_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_long_converter_impl(PyObject *module, long a)
- /*[clinic end generated code: output=02b3a83495c1d236 input=d2179e3c9cdcde89]*/
- /*[clinic input]
- test_unsigned_long_converter
- a: unsigned_long = 12
- b: unsigned_long(bitwise=False) = 34
- c: unsigned_long(bitwise=True) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unsigned_long_converter__doc__,
- "test_unsigned_long_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_UNSIGNED_LONG_CONVERTER_METHODDEF \
- {"test_unsigned_long_converter", _PyCFunction_CAST(test_unsigned_long_converter), METH_FASTCALL, test_unsigned_long_converter__doc__},
- static PyObject *
- test_unsigned_long_converter_impl(PyObject *module, unsigned long a,
- unsigned long b, unsigned long c);
- static PyObject *
- test_unsigned_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- unsigned long a = 12;
- unsigned long b = 34;
- unsigned long c = 56;
- if (!_PyArg_CheckPositional("test_unsigned_long_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedLong_Converter(args[0], &a)) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedLong_Converter(args[1], &b)) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (!PyLong_Check(args[2])) {
- _PyArg_BadArgument("test_unsigned_long_converter", "argument 3", "int", args[2]);
- goto exit;
- }
- c = PyLong_AsUnsignedLongMask(args[2]);
- skip_optional:
- return_value = test_unsigned_long_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_unsigned_long_converter_impl(PyObject *module, unsigned long a,
- unsigned long b, unsigned long c)
- /*[clinic end generated code: output=540bb0ba2894e1fe input=f450d94cae1ef73b]*/
- /*[clinic input]
- test_long_long_converter
- a: long_long = 12
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_long_long_converter__doc__,
- "test_long_long_converter($module, a=12, /)\n"
- "--\n"
- "\n");
- #define TEST_LONG_LONG_CONVERTER_METHODDEF \
- {"test_long_long_converter", _PyCFunction_CAST(test_long_long_converter), METH_FASTCALL, test_long_long_converter__doc__},
- static PyObject *
- test_long_long_converter_impl(PyObject *module, long long a);
- static PyObject *
- test_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- long long a = 12;
- if (!_PyArg_CheckPositional("test_long_long_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- a = PyLong_AsLongLong(args[0]);
- if (a == -1 && PyErr_Occurred()) {
- goto exit;
- }
- skip_optional:
- return_value = test_long_long_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_long_long_converter_impl(PyObject *module, long long a)
- /*[clinic end generated code: output=f9d4ed79ad2db857 input=d5fc81577ff4dd02]*/
- /*[clinic input]
- test_unsigned_long_long_converter
- a: unsigned_long_long = 12
- b: unsigned_long_long(bitwise=False) = 34
- c: unsigned_long_long(bitwise=True) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_unsigned_long_long_converter__doc__,
- "test_unsigned_long_long_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_UNSIGNED_LONG_LONG_CONVERTER_METHODDEF \
- {"test_unsigned_long_long_converter", _PyCFunction_CAST(test_unsigned_long_long_converter), METH_FASTCALL, test_unsigned_long_long_converter__doc__},
- static PyObject *
- test_unsigned_long_long_converter_impl(PyObject *module,
- unsigned long long a,
- unsigned long long b,
- unsigned long long c);
- static PyObject *
- test_unsigned_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- unsigned long long a = 12;
- unsigned long long b = 34;
- unsigned long long c = 56;
- if (!_PyArg_CheckPositional("test_unsigned_long_long_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedLongLong_Converter(args[0], &a)) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!_PyLong_UnsignedLongLong_Converter(args[1], &b)) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (!PyLong_Check(args[2])) {
- _PyArg_BadArgument("test_unsigned_long_long_converter", "argument 3", "int", args[2]);
- goto exit;
- }
- c = PyLong_AsUnsignedLongLongMask(args[2]);
- skip_optional:
- return_value = test_unsigned_long_long_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_unsigned_long_long_converter_impl(PyObject *module,
- unsigned long long a,
- unsigned long long b,
- unsigned long long c)
- /*[clinic end generated code: output=3d69994f618b46bb input=a15115dc41866ff4]*/
- /*[clinic input]
- test_Py_ssize_t_converter
- a: Py_ssize_t = 12
- b: Py_ssize_t(accept={int}) = 34
- c: Py_ssize_t(accept={int, NoneType}) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_Py_ssize_t_converter__doc__,
- "test_Py_ssize_t_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_PY_SSIZE_T_CONVERTER_METHODDEF \
- {"test_Py_ssize_t_converter", _PyCFunction_CAST(test_Py_ssize_t_converter), METH_FASTCALL, test_Py_ssize_t_converter__doc__},
- static PyObject *
- test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
- Py_ssize_t c);
- static PyObject *
- test_Py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- Py_ssize_t a = 12;
- Py_ssize_t b = 34;
- Py_ssize_t c = 56;
- if (!_PyArg_CheckPositional("test_Py_ssize_t_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- {
- Py_ssize_t ival = -1;
- PyObject *iobj = _PyNumber_Index(args[0]);
- if (iobj != NULL) {
- ival = PyLong_AsSsize_t(iobj);
- Py_DECREF(iobj);
- }
- if (ival == -1 && PyErr_Occurred()) {
- goto exit;
- }
- a = ival;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- {
- Py_ssize_t ival = -1;
- PyObject *iobj = _PyNumber_Index(args[1]);
- if (iobj != NULL) {
- ival = PyLong_AsSsize_t(iobj);
- Py_DECREF(iobj);
- }
- if (ival == -1 && PyErr_Occurred()) {
- goto exit;
- }
- b = ival;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (!_Py_convert_optional_to_ssize_t(args[2], &c)) {
- goto exit;
- }
- skip_optional:
- return_value = test_Py_ssize_t_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
- Py_ssize_t c)
- /*[clinic end generated code: output=48214bc3d01f4dd7 input=3855f184bb3f299d]*/
- /*[clinic input]
- test_slice_index_converter
- a: slice_index = 12
- b: slice_index(accept={int}) = 34
- c: slice_index(accept={int, NoneType}) = 56
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_slice_index_converter__doc__,
- "test_slice_index_converter($module, a=12, b=34, c=56, /)\n"
- "--\n"
- "\n");
- #define TEST_SLICE_INDEX_CONVERTER_METHODDEF \
- {"test_slice_index_converter", _PyCFunction_CAST(test_slice_index_converter), METH_FASTCALL, test_slice_index_converter__doc__},
- static PyObject *
- test_slice_index_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
- Py_ssize_t c);
- static PyObject *
- test_slice_index_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- Py_ssize_t a = 12;
- Py_ssize_t b = 34;
- Py_ssize_t c = 56;
- if (!_PyArg_CheckPositional("test_slice_index_converter", nargs, 0, 3)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyEval_SliceIndex(args[0], &a)) {
- goto exit;
- }
- if (nargs < 2) {
- goto skip_optional;
- }
- if (!_PyEval_SliceIndexNotNone(args[1], &b)) {
- goto exit;
- }
- if (nargs < 3) {
- goto skip_optional;
- }
- if (!_PyEval_SliceIndex(args[2], &c)) {
- goto exit;
- }
- skip_optional:
- return_value = test_slice_index_converter_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_slice_index_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
- Py_ssize_t c)
- /*[clinic end generated code: output=67506ed999361212 input=edeadb0ee126f531]*/
- /*[clinic input]
- test_size_t_converter
- a: size_t = 12
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_size_t_converter__doc__,
- "test_size_t_converter($module, a=12, /)\n"
- "--\n"
- "\n");
- #define TEST_SIZE_T_CONVERTER_METHODDEF \
- {"test_size_t_converter", _PyCFunction_CAST(test_size_t_converter), METH_FASTCALL, test_size_t_converter__doc__},
- static PyObject *
- test_size_t_converter_impl(PyObject *module, size_t a);
- static PyObject *
- test_size_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- size_t a = 12;
- if (!_PyArg_CheckPositional("test_size_t_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (!_PyLong_Size_t_Converter(args[0], &a)) {
- goto exit;
- }
- skip_optional:
- return_value = test_size_t_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_size_t_converter_impl(PyObject *module, size_t a)
- /*[clinic end generated code: output=1653ecb5cbf775aa input=52e93a0fed0f1fb3]*/
- /*[clinic input]
- test_float_converter
- a: float = 12.5
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_float_converter__doc__,
- "test_float_converter($module, a=12.5, /)\n"
- "--\n"
- "\n");
- #define TEST_FLOAT_CONVERTER_METHODDEF \
- {"test_float_converter", _PyCFunction_CAST(test_float_converter), METH_FASTCALL, test_float_converter__doc__},
- static PyObject *
- test_float_converter_impl(PyObject *module, float a);
- static PyObject *
- test_float_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- float a = 12.5;
- if (!_PyArg_CheckPositional("test_float_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (PyFloat_CheckExact(args[0])) {
- a = (float) (PyFloat_AS_DOUBLE(args[0]));
- }
- else
- {
- a = (float) PyFloat_AsDouble(args[0]);
- if (a == -1.0 && PyErr_Occurred()) {
- goto exit;
- }
- }
- skip_optional:
- return_value = test_float_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_float_converter_impl(PyObject *module, float a)
- /*[clinic end generated code: output=36ad006990a8a91e input=259c0d98eca35034]*/
- /*[clinic input]
- test_double_converter
- a: double = 12.5
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_double_converter__doc__,
- "test_double_converter($module, a=12.5, /)\n"
- "--\n"
- "\n");
- #define TEST_DOUBLE_CONVERTER_METHODDEF \
- {"test_double_converter", _PyCFunction_CAST(test_double_converter), METH_FASTCALL, test_double_converter__doc__},
- static PyObject *
- test_double_converter_impl(PyObject *module, double a);
- static PyObject *
- test_double_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- double a = 12.5;
- if (!_PyArg_CheckPositional("test_double_converter", nargs, 0, 1)) {
- goto exit;
- }
- if (nargs < 1) {
- goto skip_optional;
- }
- if (PyFloat_CheckExact(args[0])) {
- a = PyFloat_AS_DOUBLE(args[0]);
- }
- else
- {
- a = PyFloat_AsDouble(args[0]);
- if (a == -1.0 && PyErr_Occurred()) {
- goto exit;
- }
- }
- skip_optional:
- return_value = test_double_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_double_converter_impl(PyObject *module, double a)
- /*[clinic end generated code: output=7435925592bac795 input=c6a9945706a41c27]*/
- /*[clinic input]
- test_Py_complex_converter
- a: Py_complex
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_Py_complex_converter__doc__,
- "test_Py_complex_converter($module, a, /)\n"
- "--\n"
- "\n");
- #define TEST_PY_COMPLEX_CONVERTER_METHODDEF \
- {"test_Py_complex_converter", (PyCFunction)test_Py_complex_converter, METH_O, test_Py_complex_converter__doc__},
- static PyObject *
- test_Py_complex_converter_impl(PyObject *module, Py_complex a);
- static PyObject *
- test_Py_complex_converter(PyObject *module, PyObject *arg)
- {
- PyObject *return_value = NULL;
- Py_complex a;
- a = PyComplex_AsCComplex(arg);
- if (PyErr_Occurred()) {
- goto exit;
- }
- return_value = test_Py_complex_converter_impl(module, a);
- exit:
- return return_value;
- }
- static PyObject *
- test_Py_complex_converter_impl(PyObject *module, Py_complex a)
- /*[clinic end generated code: output=c2ecbec2144ca540 input=070f216a515beb79]*/
- /*[clinic input]
- test_str_converter
- a: str = NULL
- b: str = "ab"
- c: str(accept={str}) = "cd"
- d: str(accept={robuffer}) = "cef"
- e: str(accept={str, NoneType}) = "gh"
- f: str(accept={robuffer}, zeroes=True) = "ij"
- g: str(accept={robuffer, str}, zeroes=True) = "kl"
- h: str(accept={robuffer, str, NoneType}, zeroes=True) = "mn"
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_str_converter__doc__,
- "test_str_converter($module, a=<unrepresentable>, b=\'ab\', c=\'cd\',\n"
- " d=\'cef\', e=\'gh\', f=\'ij\', g=\'kl\', h=\'mn\', /)\n"
- "--\n"
- "\n");
- #define TEST_STR_CONVERTER_METHODDEF \
- {"test_str_converter", _PyCFunction_CAST(test_str_converter), METH_FASTCALL, test_str_converter__doc__},
- static PyObject *
- test_str_converter_impl(PyObject *module, const char *a, const char *b,
- const char *c, const char *d, const char *e,
- const char *f, Py_ssize_t f_length, const char *g,
- Py_ssize_t g_length, const char *h,
- Py_ssize_t h_length);
- static PyObject *
- test_str_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- const char *a = NULL;
- const char *b = "ab";
- const char *c = "cd";
- const char *d = "cef";
- const char *e = "gh";
- const char *f = "ij";
- Py_ssize_t f_length;
- const char *g = "kl";
- Py_ssize_t g_length;
- const char *h = "mn";
- Py_ssize_t h_length;
- if (!_PyArg_ParseStack(args, nargs, "|sssyzy#s#z#:test_str_converter",
- &a, &b, &c, &d, &e, &f, &f_length, &g, &g_length, &h, &h_length)) {
- goto exit;
- }
- return_value = test_str_converter_impl(module, a, b, c, d, e, f, f_length, g, g_length, h, h_length);
- exit:
- return return_value;
- }
- static PyObject *
- test_str_converter_impl(PyObject *module, const char *a, const char *b,
- const char *c, const char *d, const char *e,
- const char *f, Py_ssize_t f_length, const char *g,
- Py_ssize_t g_length, const char *h,
- Py_ssize_t h_length)
- /*[clinic end generated code: output=82cb06d5237ef062 input=8afe9da8185cd38c]*/
- /*[clinic input]
- test_str_converter_encoding
- a: str(encoding="idna")
- b: str(encoding="idna", accept={str})
- c: str(encoding="idna", accept={bytes, bytearray, str})
- d: str(encoding="idna", zeroes=True)
- e: str(encoding="idna", accept={bytes, bytearray, str}, zeroes=True)
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_str_converter_encoding__doc__,
- "test_str_converter_encoding($module, a, b, c, d, e, /)\n"
- "--\n"
- "\n");
- #define TEST_STR_CONVERTER_ENCODING_METHODDEF \
- {"test_str_converter_encoding", _PyCFunction_CAST(test_str_converter_encoding), METH_FASTCALL, test_str_converter_encoding__doc__},
- static PyObject *
- test_str_converter_encoding_impl(PyObject *module, char *a, char *b, char *c,
- char *d, Py_ssize_t d_length, char *e,
- Py_ssize_t e_length);
- static PyObject *
- test_str_converter_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- char *a = NULL;
- char *b = NULL;
- char *c = NULL;
- char *d = NULL;
- Py_ssize_t d_length;
- char *e = NULL;
- Py_ssize_t e_length;
- if (!_PyArg_ParseStack(args, nargs, "esesetes#et#:test_str_converter_encoding",
- "idna", &a, "idna", &b, "idna", &c, "idna", &d, &d_length, "idna", &e, &e_length)) {
- goto exit;
- }
- return_value = test_str_converter_encoding_impl(module, a, b, c, d, d_length, e, e_length);
- /* Post parse cleanup for a */
- PyMem_FREE(a);
- /* Post parse cleanup for b */
- PyMem_FREE(b);
- /* Post parse cleanup for c */
- PyMem_FREE(c);
- /* Post parse cleanup for d */
- PyMem_FREE(d);
- /* Post parse cleanup for e */
- PyMem_FREE(e);
- exit:
- return return_value;
- }
- static PyObject *
- test_str_converter_encoding_impl(PyObject *module, char *a, char *b, char *c,
- char *d, Py_ssize_t d_length, char *e,
- Py_ssize_t e_length)
- /*[clinic end generated code: output=999c1deecfa15b0a input=eb4c38e1f898f402]*/
- /*[clinic input]
- test_Py_UNICODE_converter
- a: Py_UNICODE
- b: Py_UNICODE(accept={str})
- c: Py_UNICODE(accept={str, NoneType})
- d: Py_UNICODE(zeroes=True)
- e: Py_UNICODE(accept={str, NoneType}, zeroes=True)
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_Py_UNICODE_converter__doc__,
- "test_Py_UNICODE_converter($module, a, b, c, d, e, /)\n"
- "--\n"
- "\n");
- #define TEST_PY_UNICODE_CONVERTER_METHODDEF \
- {"test_Py_UNICODE_converter", _PyCFunction_CAST(test_Py_UNICODE_converter), METH_FASTCALL, test_Py_UNICODE_converter__doc__},
- static PyObject *
- test_Py_UNICODE_converter_impl(PyObject *module, const Py_UNICODE *a,
- const Py_UNICODE *b, const Py_UNICODE *c,
- const Py_UNICODE *d, Py_ssize_t d_length,
- const Py_UNICODE *e, Py_ssize_t e_length);
- static PyObject *
- test_Py_UNICODE_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- const Py_UNICODE *a = NULL;
- const Py_UNICODE *b = NULL;
- const Py_UNICODE *c = NULL;
- const Py_UNICODE *d = NULL;
- Py_ssize_t d_length;
- const Py_UNICODE *e = NULL;
- Py_ssize_t e_length;
- if (!_PyArg_ParseStack(args, nargs, "O&O&O&u#Z#:test_Py_UNICODE_converter",
- _PyUnicode_WideCharString_Converter, &a, _PyUnicode_WideCharString_Converter, &b, _PyUnicode_WideCharString_Opt_Converter, &c, &d, &d_length, &e, &e_length)) {
- goto exit;
- }
- return_value = test_Py_UNICODE_converter_impl(module, a, b, c, d, d_length, e, e_length);
- exit:
- /* Cleanup for a */
- #if !USE_UNICODE_WCHAR_CACHE
- PyMem_Free((void *)a);
- #endif /* USE_UNICODE_WCHAR_CACHE */
- /* Cleanup for b */
- #if !USE_UNICODE_WCHAR_CACHE
- PyMem_Free((void *)b);
- #endif /* USE_UNICODE_WCHAR_CACHE */
- /* Cleanup for c */
- #if !USE_UNICODE_WCHAR_CACHE
- PyMem_Free((void *)c);
- #endif /* USE_UNICODE_WCHAR_CACHE */
- return return_value;
- }
- static PyObject *
- test_Py_UNICODE_converter_impl(PyObject *module, const Py_UNICODE *a,
- const Py_UNICODE *b, const Py_UNICODE *c,
- const Py_UNICODE *d, Py_ssize_t d_length,
- const Py_UNICODE *e, Py_ssize_t e_length)
- /*[clinic end generated code: output=9d41b3a38a0f6f2f input=064a3b68ad7f04b0]*/
- /*[clinic input]
- test_Py_buffer_converter
- a: Py_buffer
- b: Py_buffer(accept={buffer})
- c: Py_buffer(accept={str, buffer})
- d: Py_buffer(accept={str, buffer, NoneType})
- e: Py_buffer(accept={rwbuffer})
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_Py_buffer_converter__doc__,
- "test_Py_buffer_converter($module, a, b, c, d, e, /)\n"
- "--\n"
- "\n");
- #define TEST_PY_BUFFER_CONVERTER_METHODDEF \
- {"test_Py_buffer_converter", _PyCFunction_CAST(test_Py_buffer_converter), METH_FASTCALL, test_Py_buffer_converter__doc__},
- static PyObject *
- test_Py_buffer_converter_impl(PyObject *module, Py_buffer *a, Py_buffer *b,
- Py_buffer *c, Py_buffer *d, Py_buffer *e);
- static PyObject *
- test_Py_buffer_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- Py_buffer a = {NULL, NULL};
- Py_buffer b = {NULL, NULL};
- Py_buffer c = {NULL, NULL};
- Py_buffer d = {NULL, NULL};
- Py_buffer e = {NULL, NULL};
- if (!_PyArg_ParseStack(args, nargs, "y*y*s*z*w*:test_Py_buffer_converter",
- &a, &b, &c, &d, &e)) {
- goto exit;
- }
- return_value = test_Py_buffer_converter_impl(module, &a, &b, &c, &d, &e);
- exit:
- /* Cleanup for a */
- if (a.obj) {
- PyBuffer_Release(&a);
- }
- /* Cleanup for b */
- if (b.obj) {
- PyBuffer_Release(&b);
- }
- /* Cleanup for c */
- if (c.obj) {
- PyBuffer_Release(&c);
- }
- /* Cleanup for d */
- if (d.obj) {
- PyBuffer_Release(&d);
- }
- /* Cleanup for e */
- if (e.obj) {
- PyBuffer_Release(&e);
- }
- return return_value;
- }
- static PyObject *
- test_Py_buffer_converter_impl(PyObject *module, Py_buffer *a, Py_buffer *b,
- Py_buffer *c, Py_buffer *d, Py_buffer *e)
- /*[clinic end generated code: output=a153b71b4f45f952 input=6a9da0f56f9525fd]*/
- /*[clinic input]
- test_keywords
- a: object
- b: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keywords__doc__,
- "test_keywords($module, /, a, b)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORDS_METHODDEF \
- {"test_keywords", _PyCFunction_CAST(test_keywords), METH_FASTCALL|METH_KEYWORDS, test_keywords__doc__},
- static PyObject *
- test_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
- static PyObject *
- test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords", 0};
- PyObject *argsbuf[2];
- PyObject *a;
- PyObject *b;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- return_value = test_keywords_impl(module, a, b);
- exit:
- return return_value;
- }
- static PyObject *
- test_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
- /*[clinic end generated code: output=c03a52cfca192d3b input=0d3484844749c05b]*/
- /*[clinic input]
- test_keywords_kwonly
- a: object
- *
- b: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keywords_kwonly__doc__,
- "test_keywords_kwonly($module, /, a, *, b)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORDS_KWONLY_METHODDEF \
- {"test_keywords_kwonly", _PyCFunction_CAST(test_keywords_kwonly), METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly__doc__},
- static PyObject *
- test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b);
- static PyObject *
- test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly", 0};
- PyObject *argsbuf[2];
- PyObject *a;
- PyObject *b;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- return_value = test_keywords_kwonly_impl(module, a, b);
- exit:
- return return_value;
- }
- static PyObject *
- test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b)
- /*[clinic end generated code: output=4704adcb6c7df928 input=384adc78bfa0bff7]*/
- /*[clinic input]
- test_keywords_opt
- a: object
- b: object = None
- c: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keywords_opt__doc__,
- "test_keywords_opt($module, /, a, b=None, c=None)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORDS_OPT_METHODDEF \
- {"test_keywords_opt", _PyCFunction_CAST(test_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_keywords_opt__doc__},
- static PyObject *
- test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c);
- static PyObject *
- test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- c = args[2];
- skip_optional_pos:
- return_value = test_keywords_opt_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c)
- /*[clinic end generated code: output=de3ee1039da35fa1 input=eda7964f784f4607]*/
- /*[clinic input]
- test_keywords_opt_kwonly
- a: object
- b: object = None
- *
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keywords_opt_kwonly__doc__,
- "test_keywords_opt_kwonly($module, /, a, b=None, *, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORDS_OPT_KWONLY_METHODDEF \
- {"test_keywords_opt_kwonly", _PyCFunction_CAST(test_keywords_opt_kwonly), METH_FASTCALL|METH_KEYWORDS, test_keywords_opt_kwonly__doc__},
- static PyObject *
- test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d);
- static PyObject *
- test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt_kwonly", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- skip_optional_pos:
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- d = args[3];
- skip_optional_kwonly:
- return_value = test_keywords_opt_kwonly_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d)
- /*[clinic end generated code: output=996394678586854e input=209387a4815e5082]*/
- /*[clinic input]
- test_keywords_kwonly_opt
- a: object
- *
- b: object = None
- c: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keywords_kwonly_opt__doc__,
- "test_keywords_kwonly_opt($module, /, a, *, b=None, c=None)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORDS_KWONLY_OPT_METHODDEF \
- {"test_keywords_kwonly_opt", _PyCFunction_CAST(test_keywords_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly_opt__doc__},
- static PyObject *
- test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c);
- static PyObject *
- test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly_opt", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- c = args[2];
- skip_optional_kwonly:
- return_value = test_keywords_kwonly_opt_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c)
- /*[clinic end generated code: output=4ea9947a903a2f24 input=18393cc64fa000f4]*/
- /*[clinic input]
- test_posonly_keywords
- a: object
- /
- b: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords__doc__,
- "test_posonly_keywords($module, a, /, b)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_METHODDEF \
- {"test_posonly_keywords", _PyCFunction_CAST(test_posonly_keywords), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords__doc__},
- static PyObject *
- test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
- static PyObject *
- test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords", 0};
- PyObject *argsbuf[2];
- PyObject *a;
- PyObject *b;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- return_value = test_posonly_keywords_impl(module, a, b);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
- /*[clinic end generated code: output=478aad346a188a80 input=1767b0ebdf06060e]*/
- /*[clinic input]
- test_posonly_kwonly
- a: object
- /
- *
- c: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_kwonly__doc__,
- "test_posonly_kwonly($module, a, /, *, c)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KWONLY_METHODDEF \
- {"test_posonly_kwonly", _PyCFunction_CAST(test_posonly_kwonly), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly__doc__},
- static PyObject *
- test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c);
- static PyObject *
- test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly", 0};
- PyObject *argsbuf[2];
- PyObject *a;
- PyObject *c;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- c = args[1];
- return_value = test_posonly_kwonly_impl(module, a, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c)
- /*[clinic end generated code: output=d747975a0b28e9c2 input=9042f2818f664839]*/
- /*[clinic input]
- test_posonly_keywords_kwonly
- a: object
- /
- b: object
- *
- c: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_kwonly__doc__,
- "test_posonly_keywords_kwonly($module, a, /, b, *, c)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_KWONLY_METHODDEF \
- {"test_posonly_keywords_kwonly", _PyCFunction_CAST(test_posonly_keywords_kwonly), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly__doc__},
- static PyObject *
- test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c);
- static PyObject *
- test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly", 0};
- PyObject *argsbuf[3];
- PyObject *a;
- PyObject *b;
- PyObject *c;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- c = args[2];
- return_value = test_posonly_keywords_kwonly_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c)
- /*[clinic end generated code: output=5b99f692f8ddaa4a input=29546ebdca492fea]*/
- /*[clinic input]
- test_posonly_keywords_opt
- a: object
- /
- b: object
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_opt__doc__,
- "test_posonly_keywords_opt($module, a, /, b, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_OPT_METHODDEF \
- {"test_posonly_keywords_opt", _PyCFunction_CAST(test_posonly_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt__doc__},
- static PyObject *
- test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d);
- static PyObject *
- test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
- PyObject *a;
- PyObject *b;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- d = args[3];
- skip_optional_pos:
- return_value = test_posonly_keywords_opt_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d)
- /*[clinic end generated code: output=fd5dfbac5727aebb input=cdf5a9625e554e9b]*/
- /*[clinic input]
- test_posonly_keywords_opt2
- a: object
- /
- b: object = None
- c: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_opt2__doc__,
- "test_posonly_keywords_opt2($module, a, /, b=None, c=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_OPT2_METHODDEF \
- {"test_posonly_keywords_opt2", _PyCFunction_CAST(test_posonly_keywords_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2__doc__},
- static PyObject *
- test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c);
- static PyObject *
- test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- c = args[2];
- skip_optional_pos:
- return_value = test_posonly_keywords_opt2_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c)
- /*[clinic end generated code: output=777f58ac70775420 input=1581299d21d16f14]*/
- /*[clinic input]
- test_posonly_opt_keywords_opt
- a: object
- b: object = None
- /
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_opt_keywords_opt__doc__,
- "test_posonly_opt_keywords_opt($module, a, b=None, /, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_OPT_KEYWORDS_OPT_METHODDEF \
- {"test_posonly_opt_keywords_opt", _PyCFunction_CAST(test_posonly_opt_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt__doc__},
- static PyObject *
- test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d);
- static PyObject *
- test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (nargs < 2) {
- goto skip_optional_posonly;
- }
- noptargs--;
- b = args[1];
- skip_optional_posonly:
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- d = args[3];
- skip_optional_pos:
- return_value = test_posonly_opt_keywords_opt_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d)
- /*[clinic end generated code: output=2c18b8edff78ed22 input=408798ec3d42949f]*/
- /*[clinic input]
- test_posonly_kwonly_opt
- a: object
- /
- *
- b: object
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_kwonly_opt__doc__,
- "test_posonly_kwonly_opt($module, a, /, *, b, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KWONLY_OPT_METHODDEF \
- {"test_posonly_kwonly_opt", _PyCFunction_CAST(test_posonly_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt__doc__},
- static PyObject *
- test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d);
- static PyObject *
- test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
- PyObject *a;
- PyObject *b;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- d = args[3];
- skip_optional_kwonly:
- return_value = test_posonly_kwonly_opt_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d)
- /*[clinic end generated code: output=8db9ab5602e1efaf input=8d8e5643bbbc2309]*/
- /*[clinic input]
- test_posonly_kwonly_opt2
- a: object
- /
- *
- b: object = None
- c: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_kwonly_opt2__doc__,
- "test_posonly_kwonly_opt2($module, a, /, *, b=None, c=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KWONLY_OPT2_METHODDEF \
- {"test_posonly_kwonly_opt2", _PyCFunction_CAST(test_posonly_kwonly_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt2__doc__},
- static PyObject *
- test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c);
- static PyObject *
- test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt2", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- c = args[2];
- skip_optional_kwonly:
- return_value = test_posonly_kwonly_opt2_impl(module, a, b, c);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c)
- /*[clinic end generated code: output=6cfe546265d85d2c input=f7e5eed94f75fff0]*/
- /*[clinic input]
- test_posonly_opt_kwonly_opt
- a: object
- b: object = None
- /
- *
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_opt_kwonly_opt__doc__,
- "test_posonly_opt_kwonly_opt($module, a, b=None, /, *, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_OPT_KWONLY_OPT_METHODDEF \
- {"test_posonly_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_kwonly_opt__doc__},
- static PyObject *
- test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d);
- static PyObject *
- test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_kwonly_opt", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (nargs < 2) {
- goto skip_optional_posonly;
- }
- noptargs--;
- b = args[1];
- skip_optional_posonly:
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- d = args[3];
- skip_optional_kwonly:
- return_value = test_posonly_opt_kwonly_opt_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
- PyObject *c, PyObject *d)
- /*[clinic end generated code: output=8b5e21a30cad22b7 input=1e557dc979d120fd]*/
- /*[clinic input]
- test_posonly_keywords_kwonly_opt
- a: object
- /
- b: object
- *
- c: object
- d: object = None
- e: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_kwonly_opt__doc__,
- "test_posonly_keywords_kwonly_opt($module, a, /, b, *, c, d=None, e=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_KWONLY_OPT_METHODDEF \
- {"test_posonly_keywords_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt__doc__},
- static PyObject *
- test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d,
- PyObject *e);
- static PyObject *
- test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt", 0};
- PyObject *argsbuf[5];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 3;
- PyObject *a;
- PyObject *b;
- PyObject *c;
- PyObject *d = Py_None;
- PyObject *e = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- c = args[2];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[3]) {
- d = args[3];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- e = args[4];
- skip_optional_kwonly:
- return_value = test_posonly_keywords_kwonly_opt_impl(module, a, b, c, d, e);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d,
- PyObject *e)
- /*[clinic end generated code: output=950b9ace38b8b4a7 input=c3884a4f956fdc89]*/
- /*[clinic input]
- test_posonly_keywords_kwonly_opt2
- a: object
- /
- b: object
- *
- c: object = None
- d: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_kwonly_opt2__doc__,
- "test_posonly_keywords_kwonly_opt2($module, a, /, b, *, c=None, d=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_KWONLY_OPT2_METHODDEF \
- {"test_posonly_keywords_kwonly_opt2", _PyCFunction_CAST(test_posonly_keywords_kwonly_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt2__doc__},
- static PyObject *
- test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d);
- static PyObject *
- test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt2", 0};
- PyObject *argsbuf[4];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
- PyObject *a;
- PyObject *b;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- d = args[3];
- skip_optional_kwonly:
- return_value = test_posonly_keywords_kwonly_opt2_impl(module, a, b, c, d);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c, PyObject *d)
- /*[clinic end generated code: output=fb6951a21b517317 input=68d01d7c0f6dafb0]*/
- /*[clinic input]
- test_posonly_keywords_opt_kwonly_opt
- a: object
- /
- b: object
- c: object = None
- *
- d: object = None
- e: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_opt_kwonly_opt__doc__,
- "test_posonly_keywords_opt_kwonly_opt($module, a, /, b, c=None, *,\n"
- " d=None, e=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_OPT_KWONLY_OPT_METHODDEF \
- {"test_posonly_keywords_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt_kwonly_opt__doc__},
- static PyObject *
- test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e);
- static PyObject *
- test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt_kwonly_opt", 0};
- PyObject *argsbuf[5];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
- PyObject *a;
- PyObject *b;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- PyObject *e = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- b = args[1];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- skip_optional_pos:
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[3]) {
- d = args[3];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- e = args[4];
- skip_optional_kwonly:
- return_value = test_posonly_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e)
- /*[clinic end generated code: output=4db10815a99a857e input=d0883d45876f186c]*/
- /*[clinic input]
- test_posonly_keywords_opt2_kwonly_opt
- a: object
- /
- b: object = None
- c: object = None
- *
- d: object = None
- e: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_keywords_opt2_kwonly_opt__doc__,
- "test_posonly_keywords_opt2_kwonly_opt($module, a, /, b=None, c=None, *,\n"
- " d=None, e=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_KEYWORDS_OPT2_KWONLY_OPT_METHODDEF \
- {"test_posonly_keywords_opt2_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_opt2_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2_kwonly_opt__doc__},
- static PyObject *
- test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e);
- static PyObject *
- test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2_kwonly_opt", 0};
- PyObject *argsbuf[5];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- PyObject *e = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[1]) {
- b = args[1];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- skip_optional_pos:
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[3]) {
- d = args[3];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- e = args[4];
- skip_optional_kwonly:
- return_value = test_posonly_keywords_opt2_kwonly_opt_impl(module, a, b, c, d, e);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e)
- /*[clinic end generated code: output=0416689b23ebf66e input=c95e2e1ec93035ad]*/
- /*[clinic input]
- test_posonly_opt_keywords_opt_kwonly_opt
- a: object
- b: object = None
- /
- c: object = None
- d: object = None
- *
- e: object = None
- f: object = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_posonly_opt_keywords_opt_kwonly_opt__doc__,
- "test_posonly_opt_keywords_opt_kwonly_opt($module, a, b=None, /, c=None,\n"
- " d=None, *, e=None, f=None)\n"
- "--\n"
- "\n");
- #define TEST_POSONLY_OPT_KEYWORDS_OPT_KWONLY_OPT_METHODDEF \
- {"test_posonly_opt_keywords_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_opt_keywords_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt_kwonly_opt__doc__},
- static PyObject *
- test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e,
- PyObject *f);
- static PyObject *
- test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "", "c", "d", "e", "f", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt_kwonly_opt", 0};
- PyObject *argsbuf[6];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *b = Py_None;
- PyObject *c = Py_None;
- PyObject *d = Py_None;
- PyObject *e = Py_None;
- PyObject *f = Py_None;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- if (nargs < 2) {
- goto skip_optional_posonly;
- }
- noptargs--;
- b = args[1];
- skip_optional_posonly:
- if (!noptargs) {
- goto skip_optional_pos;
- }
- if (args[2]) {
- c = args[2];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- if (args[3]) {
- d = args[3];
- if (!--noptargs) {
- goto skip_optional_pos;
- }
- }
- skip_optional_pos:
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[4]) {
- e = args[4];
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- f = args[5];
- skip_optional_kwonly:
- return_value = test_posonly_opt_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e, f);
- exit:
- return return_value;
- }
- static PyObject *
- test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
- PyObject *b, PyObject *c,
- PyObject *d, PyObject *e,
- PyObject *f)
- /*[clinic end generated code: output=8892a137a8c8f46f input=9914857713c5bbf8]*/
- /*[clinic input]
- test_keyword_only_parameter
- *
- co_lnotab: PyBytesObject(c_default="(PyBytesObject *)self->co_lnotab") = None
- [clinic start generated code]*/
- PyDoc_STRVAR(test_keyword_only_parameter__doc__,
- "test_keyword_only_parameter($module, /, *, co_lnotab=None)\n"
- "--\n"
- "\n");
- #define TEST_KEYWORD_ONLY_PARAMETER_METHODDEF \
- {"test_keyword_only_parameter", _PyCFunction_CAST(test_keyword_only_parameter), METH_FASTCALL|METH_KEYWORDS, test_keyword_only_parameter__doc__},
- static PyObject *
- test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab);
- static PyObject *
- test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"co_lnotab", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_keyword_only_parameter", 0};
- PyObject *argsbuf[1];
- Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
- PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (!PyBytes_Check(args[0])) {
- _PyArg_BadArgument("test_keyword_only_parameter", "argument 'co_lnotab'", "bytes", args[0]);
- goto exit;
- }
- co_lnotab = (PyBytesObject *)args[0];
- skip_optional_kwonly:
- return_value = test_keyword_only_parameter_impl(module, co_lnotab);
- exit:
- return return_value;
- }
- static PyObject *
- test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab)
- /*[clinic end generated code: output=332b5f4b444c5d55 input=303df5046c7e37a3]*/
- /*[clinic input]
- output push
- output preset buffer
- [clinic start generated code]*/
- /*[clinic end generated code: output=da39a3ee5e6b4b0d input=5bff3376ee0df0b5]*/
- #ifdef CONDITION_A
- /*[clinic input]
- test_preprocessor_guarded_condition_a
- [clinic start generated code]*/
- static PyObject *
- test_preprocessor_guarded_condition_a_impl(PyObject *module)
- /*[clinic end generated code: output=ad012af18085add6 input=8edb8706a98cda7e]*/
- #elif CONDITION_B
- /*[clinic input]
- test_preprocessor_guarded_elif_condition_b
- [clinic start generated code]*/
- static PyObject *
- test_preprocessor_guarded_elif_condition_b_impl(PyObject *module)
- /*[clinic end generated code: output=615f2dee82b138d1 input=53777cebbf7fee32]*/
- #else
- /*[clinic input]
- test_preprocessor_guarded_else
- [clinic start generated code]*/
- static PyObject *
- test_preprocessor_guarded_else_impl(PyObject *module)
- /*[clinic end generated code: output=13af7670aac51b12 input=6657ab31d74c29fc]*/
- #endif
- /*[clinic input]
- dump buffer
- output pop
- [clinic start generated code]*/
- #if defined(CONDITION_A)
- PyDoc_STRVAR(test_preprocessor_guarded_condition_a__doc__,
- "test_preprocessor_guarded_condition_a($module, /)\n"
- "--\n"
- "\n");
- #define TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF \
- {"test_preprocessor_guarded_condition_a", (PyCFunction)test_preprocessor_guarded_condition_a, METH_NOARGS, test_preprocessor_guarded_condition_a__doc__},
- static PyObject *
- test_preprocessor_guarded_condition_a(PyObject *module, PyObject *Py_UNUSED(ignored))
- {
- return test_preprocessor_guarded_condition_a_impl(module);
- }
- #endif /* defined(CONDITION_A) */
- #if !defined(CONDITION_A) && (CONDITION_B)
- PyDoc_STRVAR(test_preprocessor_guarded_elif_condition_b__doc__,
- "test_preprocessor_guarded_elif_condition_b($module, /)\n"
- "--\n"
- "\n");
- #define TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF \
- {"test_preprocessor_guarded_elif_condition_b", (PyCFunction)test_preprocessor_guarded_elif_condition_b, METH_NOARGS, test_preprocessor_guarded_elif_condition_b__doc__},
- static PyObject *
- test_preprocessor_guarded_elif_condition_b(PyObject *module, PyObject *Py_UNUSED(ignored))
- {
- return test_preprocessor_guarded_elif_condition_b_impl(module);
- }
- #endif /* !defined(CONDITION_A) && (CONDITION_B) */
- #if !defined(CONDITION_A) && !(CONDITION_B)
- PyDoc_STRVAR(test_preprocessor_guarded_else__doc__,
- "test_preprocessor_guarded_else($module, /)\n"
- "--\n"
- "\n");
- #define TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF \
- {"test_preprocessor_guarded_else", (PyCFunction)test_preprocessor_guarded_else, METH_NOARGS, test_preprocessor_guarded_else__doc__},
- static PyObject *
- test_preprocessor_guarded_else(PyObject *module, PyObject *Py_UNUSED(ignored))
- {
- return test_preprocessor_guarded_else_impl(module);
- }
- #endif /* !defined(CONDITION_A) && !(CONDITION_B) */
- #ifndef TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF
- #define TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF
- #endif /* !defined(TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF) */
- #ifndef TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF
- #define TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF
- #endif /* !defined(TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF) */
- #ifndef TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF
- #define TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF
- #endif /* !defined(TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF) */
- /*[clinic end generated code: output=3804bb18d454038c input=3fc80c9989d2f2e1]*/
- /*[clinic input]
- test_vararg_and_posonly
- a: object
- *args: object
- /
- [clinic start generated code]*/
- PyDoc_STRVAR(test_vararg_and_posonly__doc__,
- "test_vararg_and_posonly($module, a, /, *args)\n"
- "--\n"
- "\n");
- #define TEST_VARARG_AND_POSONLY_METHODDEF \
- {"test_vararg_and_posonly", _PyCFunction_CAST(test_vararg_and_posonly), METH_FASTCALL, test_vararg_and_posonly__doc__},
- static PyObject *
- test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args);
- static PyObject *
- test_vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
- {
- PyObject *return_value = NULL;
- PyObject *a;
- PyObject *__clinic_args = NULL;
- if (!_PyArg_CheckPositional("test_vararg_and_posonly", nargs, 1, PY_SSIZE_T_MAX)) {
- goto exit;
- }
- a = args[0];
- __clinic_args = PyTuple_New(nargs - 1);
- if (!__clinic_args) {
- goto exit;
- }
- for (Py_ssize_t i = 0; i < nargs - 1; ++i) {
- PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[1 + i]));
- }
- return_value = test_vararg_and_posonly_impl(module, a, __clinic_args);
- exit:
- Py_XDECREF(__clinic_args);
- return return_value;
- }
- static PyObject *
- test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args)
- /*[clinic end generated code: output=79b75dc07decc8d6 input=08dc2bf7afbf1613]*/
- /*[clinic input]
- test_vararg
- a: object
- *args: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_vararg__doc__,
- "test_vararg($module, /, a, *args)\n"
- "--\n"
- "\n");
- #define TEST_VARARG_METHODDEF \
- {"test_vararg", _PyCFunction_CAST(test_vararg), METH_FASTCALL|METH_KEYWORDS, test_vararg__doc__},
- static PyObject *
- test_vararg_impl(PyObject *module, PyObject *a, PyObject *args);
- static PyObject *
- test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg", 0};
- PyObject *argsbuf[2];
- PyObject *a;
- PyObject *__clinic_args = NULL;
- args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- __clinic_args = args[1];
- return_value = test_vararg_impl(module, a, __clinic_args);
- exit:
- Py_XDECREF(__clinic_args);
- return return_value;
- }
- static PyObject *
- test_vararg_impl(PyObject *module, PyObject *a, PyObject *args)
- /*[clinic end generated code: output=ce9334333757f6ea input=81d33815ad1bae6e]*/
- /*[clinic input]
- test_vararg_with_default
- a: object
- *args: object
- b: bool = False
- [clinic start generated code]*/
- PyDoc_STRVAR(test_vararg_with_default__doc__,
- "test_vararg_with_default($module, /, a, *args, b=False)\n"
- "--\n"
- "\n");
- #define TEST_VARARG_WITH_DEFAULT_METHODDEF \
- {"test_vararg_with_default", _PyCFunction_CAST(test_vararg_with_default), METH_FASTCALL|METH_KEYWORDS, test_vararg_with_default__doc__},
- static PyObject *
- test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
- int b);
- static PyObject *
- test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"a", "b", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg_with_default", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
- PyObject *a;
- PyObject *__clinic_args = NULL;
- int b = 0;
- args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
- if (!args) {
- goto exit;
- }
- a = args[0];
- __clinic_args = args[1];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- b = PyObject_IsTrue(args[2]);
- if (b < 0) {
- goto exit;
- }
- skip_optional_kwonly:
- return_value = test_vararg_with_default_impl(module, a, __clinic_args, b);
- exit:
- Py_XDECREF(__clinic_args);
- return return_value;
- }
- static PyObject *
- test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
- int b)
- /*[clinic end generated code: output=32fb19dd6bcf9185 input=6e110b54acd9b22d]*/
- /*[clinic input]
- test_vararg_with_only_defaults
- *args: object
- b: bool = False
- c: object = ' '
- [clinic start generated code]*/
- PyDoc_STRVAR(test_vararg_with_only_defaults__doc__,
- "test_vararg_with_only_defaults($module, /, *args, b=False, c=\' \')\n"
- "--\n"
- "\n");
- #define TEST_VARARG_WITH_ONLY_DEFAULTS_METHODDEF \
- {"test_vararg_with_only_defaults", _PyCFunction_CAST(test_vararg_with_only_defaults), METH_FASTCALL|METH_KEYWORDS, test_vararg_with_only_defaults__doc__},
- static PyObject *
- test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
- PyObject *c);
- static PyObject *
- test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"b", "c", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg_with_only_defaults", 0};
- PyObject *argsbuf[3];
- Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
- PyObject *__clinic_args = NULL;
- int b = 0;
- PyObject *c = " ";
- args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- __clinic_args = args[0];
- if (!noptargs) {
- goto skip_optional_kwonly;
- }
- if (args[1]) {
- b = PyObject_IsTrue(args[1]);
- if (b < 0) {
- goto exit;
- }
- if (!--noptargs) {
- goto skip_optional_kwonly;
- }
- }
- c = args[2];
- skip_optional_kwonly:
- return_value = test_vararg_with_only_defaults_impl(module, __clinic_args, b, c);
- exit:
- Py_XDECREF(__clinic_args);
- return return_value;
- }
- static PyObject *
- test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
- PyObject *c)
- /*[clinic end generated code: output=7e393689e6ce61a3 input=fa56a709a035666e]*/
- /*[clinic input]
- test_paramname_module
- module as mod: object
- [clinic start generated code]*/
- PyDoc_STRVAR(test_paramname_module__doc__,
- "test_paramname_module($module, /, module)\n"
- "--\n"
- "\n");
- #define TEST_PARAMNAME_MODULE_METHODDEF \
- {"test_paramname_module", _PyCFunction_CAST(test_paramname_module), METH_FASTCALL|METH_KEYWORDS, test_paramname_module__doc__},
- static PyObject *
- test_paramname_module_impl(PyObject *module, PyObject *mod);
- static PyObject *
- test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
- {
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"module", NULL};
- static _PyArg_Parser _parser = {NULL, _keywords, "test_paramname_module", 0};
- PyObject *argsbuf[1];
- PyObject *mod;
- args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
- if (!args) {
- goto exit;
- }
- mod = args[0];
- return_value = test_paramname_module_impl(module, mod);
- exit:
- return return_value;
- }
- static PyObject *
- test_paramname_module_impl(PyObject *module, PyObject *mod)
- /*[clinic end generated code: output=23379a7ffa65c514 input=afefe259667f13ba]*/
|