-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
العمل على ملف textio.cpp #102
base: Alif5.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
تمت المراجعة
يرجى العمل على الملاحظات
errors = &ALIF_ID(strict); | ||
} | ||
else if (!ALIFUSTR_CHECK(errors)) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
حذف السطر الفارغ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
يجب حذف هذا الملف من طلب الرفع
@@ -101,3 +101,154 @@ class TextIO { // 658 | |||
|
|||
AlifIOState* state{}; | |||
}; | |||
|
|||
|
|||
static AlifIntT _ioTextIOWrapper_init_impl(TextIO* _self, AlifObject* _buffer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ioTextIOWrapper___init__Impl
const char* _encoding, AlifObject* _errors, | ||
const char* _newLine, AlifIntT _lineBuffering, | ||
AlifIntT _writeThrough) { // 1088 | ||
AlifObject* raw, * codeAlifInfo = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
تهيئة raw
_self->encoding = &ALIF_STR(utf8); | ||
} | ||
if (_encoding == nullptr or (strcmp(_encoding, "locale") == 0)) { | ||
_self->encoding = alif_getLocaleEncodingObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alif_getLocaleEncodingObject or _alif_getLocaleEncodingObject?
goto error; | ||
} | ||
|
||
codeAlifInfo = _alifCodec_lookupTextEncoding(_encoding, "codecs.open()"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codecInfo
ALIF_IS_TYPE(_buffer, state->alifBufferedWriterType) or | ||
ALIF_IS_TYPE(_buffer, state->alifBufferedRandomType)) | ||
{ | ||
if (alifObject_getOptionalAttr(_buffer, &ALIF_ID(raw), &raw) < 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&ALIF_ID(Raw)
if (alifObject_getOptionalAttr(_buffer, &ALIF_ID(raw), &raw) < 0) | ||
goto error; | ||
if (raw != nullptr) { | ||
if (ALIF_IS_TYPE(raw, state->PyFileIO_Type)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alifFileIOType
_self->has_read1 = r; | ||
|
||
_self->encodingStartOfStream = 0; | ||
if (textIOWrapper_fixEncoderState(_self) < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_textIOWrapper_fixEncoderState
No description provided.